Skip to content

PengfeiM/go-example-github

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-example

What is it?

这是一个 golang 的练习库。用于熟悉一些 golang 的机制。 基于 cobra,和 Go by Example

How to use?

# list all example
go run main.go list

# run a certain example
go run main.go run <GoExample>

TODO: add doc for certain go example

How to build?

./scripts/build.sh

you may find executable file in (project path)/output/

How to develop?

  1. create a path for your example
mkdir pkg/goexpl/foo/foo.go
  1. Implement your owner GoExample
    a. Implement interface GoExample
    b. define a name in pkg/common/constats
    c. add your go example in cmd.AllGoExample
    you may refer to former commit.
  2. run for test
go run main.go run foo

About

go example

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages