Adding explanation to contributing.

This commit is contained in:
Aleksandr Melnikov 2020-06-04 18:05:13 -07:00
parent 1efd66d010
commit 3378899c5c

View File

@ -122,6 +122,8 @@ After this, build main.go and run the executable.
## Code Structure & Organization ## Code Structure & Organization
### `utils` dir
```shell script ```shell script
utils/*.go utils/*.go
``` ```
@ -150,4 +152,25 @@ These can be pulled out into their own package or into a new v2 directory if nee
You can add You can add
- kubernetes specific operations - kubernetes specific operations
- database specific operations - database specific operations
- types - types
### `cmd` dir
Each source file here is assumed to result in an executable.
- Hence the `package main` at the top of each
Place each source file into it's own folder.
Example source file name: `flush_cache.go`
- Dir structure: `cmd/flush-cache/flush_cache.go`
To avoid errors like this during docker build
```text
# github.com/onepanelio/core/cmd
cmd/goose.go:22:6: main redeclared in this block
previous declaration at cmd/gen-release-md.go:136:6
github.com/onepanelio/core
```
Caused by
```dockerfile
RUN go install -v ./...
```