Code refactoring for bpa operator
[icn.git] / cmd / bpa-operator / vendor / go.uber.org / zap / CONTRIBUTING.md
1 # Contributing
2
3 We'd love your help making zap the very best structured logging library in Go!
4
5 If you'd like to add new exported APIs, please [open an issue][open-issue]
6 describing your proposal — discussing API changes ahead of time makes
7 pull request review much smoother. In your issue, pull request, and any other
8 communications, please remember to treat your fellow contributors with
9 respect! We take our [code of conduct](CODE_OF_CONDUCT.md) seriously.
10
11 Note that you'll need to sign [Uber's Contributor License Agreement][cla]
12 before we can accept any of your contributions. If necessary, a bot will remind
13 you to accept the CLA when you open your pull request.
14
15 ## Setup
16
17 [Fork][fork], then clone the repository:
18
19 ```
20 mkdir -p $GOPATH/src/go.uber.org
21 cd $GOPATH/src/go.uber.org
22 git clone git@github.com:your_github_username/zap.git
23 cd zap
24 git remote add upstream https://github.com/uber-go/zap.git
25 git fetch upstream
26 ```
27
28 Install zap's dependencies:
29
30 ```
31 make dependencies
32 ```
33
34 Make sure that the tests and the linters pass:
35
36 ```
37 make test
38 make lint
39 ```
40
41 If you're not using the minor version of Go specified in the Makefile's
42 `LINTABLE_MINOR_VERSIONS` variable, `make lint` doesn't do anything. This is
43 fine, but it means that you'll only discover lint failures after you open your
44 pull request.
45
46 ## Making Changes
47
48 Start by creating a new branch for your changes:
49
50 ```
51 cd $GOPATH/src/go.uber.org/zap
52 git checkout master
53 git fetch upstream
54 git rebase upstream/master
55 git checkout -b cool_new_feature
56 ```
57
58 Make your changes, then ensure that `make lint` and `make test` still pass. If
59 you're satisfied with your changes, push them to your fork.
60
61 ```
62 git push origin cool_new_feature
63 ```
64
65 Then use the GitHub UI to open a pull request.
66
67 At this point, you're waiting on us to review your changes. We *try* to respond
68 to issues and pull requests within a few business days, and we may suggest some
69 improvements or alternatives. Once your changes are approved, one of the
70 project maintainers will merge them.
71
72 We're much more likely to approve your changes if you:
73
74 * Add tests for new functionality.
75 * Write a [good commit message][commit-message].
76 * Maintain backward compatibility.
77
78 [fork]: https://github.com/uber-go/zap/fork
79 [open-issue]: https://github.com/uber-go/zap/issues/new
80 [cla]: https://cla-assistant.io/uber-go/zap
81 [commit-message]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html