/code-gen

a code generator CLI tool

Primary LanguageGoApache License 2.0Apache-2.0

code-gen

a code generator CLI tool

how to install

go get -u github.com/paulyung541/code-gen

create demo project

golang

default is golang

$ code-gen gen -d -n {your_project_name}

then the {your_project_name} project will created in your current directory like follow

./your_project_name
    main.go
    Makefile

clang

use --demo-type flag

$ code-gen gen -d -n {your_project_name} --demo-type clang

./your_project_name
    main.c
    Makefile

json to golang struct

let your json file in current directory first, and run this command

$ code-gen json

then the go file will be created

License

license