github.com/koron/hk@v0.0.0-20150303213137-b8aeaa3ab34c/CONTRIBUTING.md (about) 1 # Contribution Guidelines 2 3 hk's design is very much unfinished, and we're not yet ready to accept 4 contributions or requests related to design. At this time, please only submit 5 bug reports or pull requests that fix bugs. 6 7 Once we've finished some full iterations on the design, we'll be more open to 8 feature requests and discussions around design. 9 10 It will also take some time to come up with a written description of the design 11 philosophy and code quality standards for things like idiomatic Go. In the mean 12 time, we'll review and discuss on a case-by-case basis. 13 14 ## Philosophy 15 16 Check out the [readme](https://github.com/heroku/hk/blob/master/README.md#motivation). 17 18 ## Code Standards 19 20 We strive to write idiomatic Go code, and welcome any suggestions on how to 21 better leverage the expressive nature of Go code. Here are a few guidelines: 22 23 * Please `go fmt` everything before submitting. 24 * Package imports from 3rd parties should be listed separately, in the 25 [goimports][goimports] style: 26 27 ```go 28 import ( 29 "fmt" 30 "io" 31 "strings" 32 33 "github.com/bgentry/heroku-go" 34 "github.com/heroku/hk/term" 35 ) 36 ``` 37 38 * Use `fmt` to print to stdout, and `log` to print to stderr. Stdout should be 39 reserved for output that is intended to be piped into other processes, while 40 stderr should be used for informational messaging or errors: 41 42 ```go 43 fmt.Println("dodging-samurai-42") 44 fmt.Println("web.1 up 3h bin/web") 45 46 log.Println("Created dodging-samurai-42.") 47 log.Println("This is an error :(") 48 ``` 49 50 ## Style Guide 51 52 The style guide is available at [hk.heroku.com/styleguide.html][styleguide]. The 53 style guide can be automatically generated using hk's help output: 54 55 ```bash 56 $ ./hk help styleguide > hkdist/public/styleguide.html 57 ``` 58 59 [goimports]: https://github.com/bradfitz/goimports 60 [styleguide]: https://hk.heroku.com/styleguide.html