cmd

package
v0.0.0-...-10437d4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "restful-api",
	Short: "restful-api crud dmeo",
	Long:  `restful-api ...`,
	RunE: func(cmd *cobra.Command, args []string) error {
		if vers {
			fmt.Println("0.0.1")
			return nil
		}
		return errors.New("no flags find")
	},
}

RootCmd represents the base command when called without any subcommands

Functions

func Execute

func Execute()

Execute adds all child commands to the root command sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

service 服务的整体配置 服务可能启动很多模块: http, grpc, contable

func NewService

func NewService(conf *conf.Config) *Service

func (*Service) Start

func (s *Service) Start() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL