cmd_program

package
v0.0.0-...-1278c99 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TrialCmd = &cobra.Command{
	Use:   "trial",
	Short: "trail some package",
	Long:  `trail some package`,
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("trial called")
		o := Output{
			A: A{Owner: "aa"},
			C: C{Name: "cc"},
		}
		fmt.Printf("%v\n", o.GetName())
	},
}

trialCmd represents the trial command

Functions

This section is empty.

Types

type A

type A struct {
	Owner string
}

func (A) GetName

func (a A) GetName() string

type C

type C struct {
	Name string
}

Combine 结构组合接口

func (C) GetName

func (c C) GetName() string

type Output

type Output struct {
	C
	A
}

Output 结构嵌套接口

func (Output) GetName

func (o Output) GetName() string

Jump to

Keyboard shortcuts

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