模板操作

    模板初始化

    1. goctl template init - initialize the all templates(force update)
    2. USAGE:
    3. goctl template init [command options] [arguments...]
    4. OPTIONS:
    5. --home value the goctl home path of the template
    1. goctl template clean - clean the all cache templates
    2. USAGE:
    3. goctl template clean [command options] [arguments...]
    4. OPTIONS:
    5. --home value the goctl home path of the template

    回滚指定分类模板

    1. NAME:
    2. USAGE:
    3. goctl template revert [command options] [arguments...]
    4. OPTIONS:
    5. --category value, -c value the category of template, enum [api,rpc,model,docker,kube]
    6. --home value the goctl home path of the template

    模板加载

    • goctl api go 详情可以通过goctl api go --help查看帮助
    • goctl docker 详情可以通过goctl docker --help查看帮助
    • goctl kube 详情可以通过goctl kube --help查看帮助
    • 详情可以通过goctl rpc new --help查看帮助
    • goctl rpc proto 详情可以通过goctl rpc proto --help查看帮助
    • goctl model mysql ddl 详情可以通过goctl model mysql ddl --help查看帮助
    • goctl model mysql datasource 详情可以通过goctl model mysql datasource --help查看帮助
    • goctl model postgresql datasource 详情可以通过goctl model mysql datasource --help查看帮助
    • goctl model mongo 详情可以通过goctl model mongo --help查看帮助
    • 初始化模板到指定$HOME/template目录下
      1. $ goctl template init --home $HOME/template
    • 使用$HOME/template模板进行greet rpc生成
    1. Done