1 Star 1 Fork 0

kin9-0rz / goapk

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
dex.go 1.26 KB
一键复制 编辑 原始数据 按行查看 历史
kin9-0rz 提交于 2022-07-13 15:20 . feat: 🎸 添加多个命令
/*
Copyright © 2022 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.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package cmd
import (
"fmt"
"github.com/spf13/cobra"
)
// dexCmd represents the dex command
var dexCmd = &cobra.Command{
Use: "dex",
Short: "dex解析",
Long: `dex解析`,
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("dex called")
},
}
func init() {
rootCmd.AddCommand(dexCmd)
// Here you will define your flags and configuration settings.
// Cobra supports Persistent Flags which will work for this command
// and all subcommands, e.g.:
// dexCmd.PersistentFlags().String("foo", "", "A help for foo")
// Cobra supports local flags which will only run when this command
// is called directly, e.g.:
// dexCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
}
Go
1
https://gitee.com/kin9-0rz/goapk.git
git@gitee.com:kin9-0rz/goapk.git
kin9-0rz
goapk
goapk
v1.1.6

搜索帮助