Skip to content

Latest commit

 

History

History
13 lines (13 loc) · 427 Bytes

README.md

File metadata and controls

13 lines (13 loc) · 427 Bytes

1. Install

  1. go mod init hello-cli
  2. go get -u github.com/spf13/cobra

2. Init Project

  1. cobra-cli init
  2. cobra-cli add greetgl

3. Write a application code(update cmd/greet.go)

  1. Print Hello World
  2. Print Hello ${name}, default name is World
  3. (Print Hello ${name}, default name is World) * ${count}, default count is 1

4. Results

execute_image

5. Write the makefile