Skip to content

Commit

Permalink
Added standard repo files
Browse files Browse the repository at this point in the history
  • Loading branch information
mrz1836 committed Sep 30, 2020
1 parent fef5af2 commit dc8e6c0
Show file tree
Hide file tree
Showing 6 changed files with 184 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Make sure to check the documentation at http://goreleaser.com
# ---------------------------
# GENERAL
# ---------------------------
before:
hooks:
- make all
snapshot:
name_template: "{{ .Tag }}"
changelog:
sort: asc
filters:
exclude:
- '^.github:'
- '^test:'

# ---------------------------
# BUILDER
# ---------------------------
build:
skip: true
# ---------------------------
# Github Release
# ---------------------------
release:
prerelease: true
name_template: "Release v{{.Version}}"
29 changes: 29 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Fast runner (trick from @y0ssar1an) (out-dated)
sudo: false

# Language of deployment
language: go

# Version
go:
- 1.15.x

# Environment variables
env:
- GO111MODULE=on

# Only clone the most recent commit
git:
depth: 1

# Notifications off
notifications:
email: false

# Run all scripts
script:
- make test-travis

# After build success
after_success:
- bash <(curl -s https://codecov.io/bash)
52 changes: 52 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Code of Merit

1. The project creators, lead developers, core team, constitute
the managing members of the project and have final say in every decision
of the project, technical or otherwise, including overruling previous decisions.
There are no limitations to this decisional power.

2. Contributions are an expected result of your membership on the project.
Don't expect others to do your work or help you with your work forever.

3. All members have the same opportunities to seek any challenge they want
within the project.

4. Authority or position in the project will be proportional
to the accrued contribution. Seniority must be earned.

5. Software is evolutive: the better implementations must supersede lesser
implementations. Technical advantage is the primary evaluation metric.

6. This is a space for technical prowess; topics outside of the project
will not be tolerated.

7. Non technical conflicts will be discussed in a separate space. Disruption
of the project will not be allowed.

8. Individual characteristics, including but not limited to,
body, sex, sexual preference, race, language, religion, nationality,
or political preferences are irrelevant in the scope of the project and
will not be taken into account concerning your value or that of your contribution
to the project.

9. Discuss or debate the idea, not the person.

10. There is no room for ambiguity: Ambiguity will be met with questioning;
further ambiguity will be met with silence. It is the responsibility
of the originator to provide requested context.

11. If something is illegal outside the scope of the project, it is illegal
in the scope of the project. This Code of Merit does not take precedence over
governing law.

12. This Code of Merit governs the technical procedures of the project not the
activities outside of it.

13. Participation on the project equates to agreement of this Code of Merit.

14. No objectives beyond the stated objectives of this project are relevant
to the project. Any intent to deviate the project from its original purpose
of existence will constitute grounds for remedial action which may include
expulsion from the project.

This document is the Code of Merit (<del>`http://code-of-merit.org`</del>), version 1.0.
37 changes: 37 additions & 0 deletions CODE_STANDARDS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Code Standards

This project uses the following code standards and specifications from:
- [effective go](https://golang.org/doc/effective_go.html)
- [go tests](https://golang.org/pkg/testing/)
- [go examples](https://golang.org/pkg/testing/#hdr-Examples)
- [go benchmarks](https://golang.org/pkg/testing/#hdr-Benchmarks)
- [gofmt](https://golang.org/cmd/gofmt/)
- [golint](https://github.com/golang/lint)
- [godoc](https://godoc.org/golang.org/x/tools/cmd/godoc)
- [vet](https://golang.org/cmd/vet/)
- [report card](https://goreportcard.com/)

### *effective go* standards
View the [effective go](https://golang.org/doc/effective_go.html) standards documentation.

### *golint* specifications
The package [golint](https://github.com/golang/lint) differs from [gofmt](https://golang.org/cmd/gofmt/). The package [gofmt](https://golang.org/cmd/gofmt/) formats Go source code, whereas [golint](https://github.com/golang/lint) prints out style mistakes. The package [golint](https://github.com/golang/lint) differs from [vet](https://golang.org/cmd/vet/). The package [vet](https://golang.org/cmd/vet/) is concerned with correctness, whereas [golint](https://github.com/golang/lint) is concerned with coding style. The package [golint](https://github.com/golang/lint) is in use at Google, and it seeks to match the accepted style of the open source [Go project](https://golang.org/).

How to install [golint](https://github.com/golang/lint):
```shell script
go get -u golang.org/x/lint/golint
cd ../go-bitcoin
golint
```

### *go vet* specifications
[Vet](https://golang.org/cmd/vet/) examines Go source code and reports suspicious constructs. [Vet](https://golang.org/cmd/vet/) uses heuristics that do not guarantee all reports are genuine problems, but it can find errors not caught by the compilers.

How to run [vet](https://golang.org/cmd/vet/):
```shell script
cd ../go-bitcoin
go vet -v
```

### *godoc* specifications
All code is written with documentation in mind. Follow the best practices with naming, examples and function descriptions.
18 changes: 18 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# How to contribute

Please send a GitHub Pull Request to with a clear list of what you've done (read more about [pull requests](http://help.github.com/pull-requests/)). The more tests the merrier. Please follow the coding conventions (below) and make sure all of your commits are atomic (one feature per commit).

## Testing

All tests follow the standard Go testing pattern.
- [Go Tests](https://golang.org/pkg/testing/)
- [Go Examples](https://golang.org/pkg/testing/#hdr-Examples)
- [Go Benchmarks](https://golang.org/pkg/testing/#hdr-Benchmarks)

## Coding conventions

This project follows [effective Go standards](https://golang.org/doc/effective_go.html) and uses additional convention tools:
- [godoc](https://godoc.org/golang.org/x/tools/cmd/godoc)
- [golint](https://github.com/golang/lint)
- [vet](https://golang.org/cmd/vet/)
- [GoReportCard.com](https://goreportcard.com/report/github.com/rohenaz/go-bitcoin)
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 @rohenaz

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

0 comments on commit dc8e6c0

Please sign in to comment.