Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zh/mymod
Playing with Go modules
https://github.com/zh/mymod
Last synced: 10 days ago
JSON representation
Playing with Go modules
- Host: GitHub
- URL: https://github.com/zh/mymod
- Owner: zh
- License: unlicense
- Created: 2019-10-02T05:31:17.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-10-02T06:12:59.000Z (about 5 years ago)
- Last Synced: 2023-04-10T23:24:03.241Z (over 1 year ago)
- Language: Go
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mymod - sample Go modules package
For more details see https://eli.thegreenplace.net/2019/simple-go-project-layout-with-modules/
To use the packages in this module, add an import in Go code and call it:
```
import "github.com/zh/mymod"
import "github.com/zh/mymod/clientlib"// ... later
s := mymod.Config()
h := clientlib.Hello()
```To use the `mymod-server` binary, do:
```
$ go get github.com/zh/mymod/cmd/mymod-server
$ mymod-server
```All packages in this module are importable by other modules, except for packages
located in the `internal` directory. These can only be used from within the
module itself, but cannot be imported from the outside.To run all tests in this module:
```
go test ./...
```