package
0.0.0-20241206023643-bd73712c6e77
Repository: https://github.com/a406299736/goframe.git
Documentation: pkg.go.dev
# README
使用
- 初始终端包: cobra init --pkg-name github.com/a406299736/goframe/console
- 新增执行任务:cobra add MockDemo
- 执行:go run console/main.go MockDemo 或 go build -o cmd; ./cmd MockDemo; 执行带参数:go run console/main.go MockDemo -y true 或 ./cmd MockDemo -y true; 或 定义方式不同,执行也不同: 定义1: redisMqConsumerCmd.Flags().StringP("name1", "n", "", "Help message for toggle") 执行1: go run console/main.go redisMqConsumer -n abc 定义2: redisMqConsumerCmd.Flags().String("env", "", "Help message for toggle") 执行2: go run console/main.go redisMqConsumer --env rel 特别注意: -- 两个短横线
# Packages
Copyright © 2021 NAME HERE <EMAIL ADDRESS>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.