GithubHelp home page GithubHelp logo

xogen's Introduction

xogen 1.0

Overview

xogen is a code generator that can convert models from the "github.com/go-xorm" project into dao code. This makes it easy to generate dao crud code that corresponds to the model.

Feature List

  • Converts models from "github.com/go-xorm" into dao code
  • Generates dao crud code easily

Development

Prerequisites

  • Go 1.16 or later

Installing

go get github.com/carsonfeng/xogen

Building

cd $GOPATH/src/github.com/carsonfeng/xogen
go build

Release

make tag t=v0.0.X m="release_log"

v0.0.X is tag name make tag t=v1.2.1 m='new_feature'

Version 1.0

First release of xogen.

Usage

xogen [options]

Options

  • -model_path specifies the path of model. For Example: testcases/models/models.go
  • -models specifies the xorm model struct names, separated by comma ',' . For Example: DemoTeamModel1,DemoUserModel2
  • -output_dao specifies the path of dao output. For Example: testcases/daos/demo_daos.go
  • -model_import specifies imported package of model. For Example: xogen/testcases/models

Integrated with your projects

Step 1: Build a tools project. Follow the examples of main.go and ./testcases/templated.go in this project.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.