Skip to content

Commit 346f47d

Browse files
authored
Merge pull request #1 from digitalocean/mdl-init
*: add authors, contributing, license checks, stub Go source
2 parents 0fd5b8d + 640c854 commit 346f47d

File tree

6 files changed

+93
-1
lines changed

6 files changed

+93
-1
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ os:
66
sudo: required
77
before_install:
88
- go get github.com/golang/lint/golint
9-
- go get honnef.co/go/staticcheck/cmd/staticcheck
9+
- go get honnef.co/go/tools/cmd/staticcheck
1010
- go get -d ./...
1111
script:
12+
- ./scripts/licensecheck.sh
1213
- go build -tags=gofuzz ./...
1314
- go vet ./...
1415
- staticcheck ./...

AUTHORS

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Maintainer
2+
----------
3+
DigitalOcean, Inc
4+
5+
Original Authors
6+
----------------
7+
Matt Layher <[email protected]>
8+
9+
Contributors
10+
------------
11+
Michael Ben-Ami <[email protected]>
12+
Tejas Kokje <[email protected]>
13+
Kei Nohguchi <[email protected]>
14+
Neal Shrader <[email protected]>

CONTRIBUTING.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
Contributing
2+
============
3+
4+
The `go-openvswitch` project makes use of the [GitHub Flow](https://guides.github.com/introduction/flow/)
5+
for contributions.
6+
7+
If you'd like to contribute to the project, please
8+
[open an issue](https://github.com/digitalocean/go-openvswitch/issues/new) or find an
9+
[existing issue](https://github.com/digitalocean/go-openvswitch/issues) that you'd like
10+
to take on. This ensures that efforts are not duplicated, and that a new feature
11+
aligns with the focus of the rest of the repository.
12+
13+
Once your suggestion has been submitted and discussed, please be sure that your
14+
code meets the following criteria:
15+
- code is completely `gofmt`'d
16+
- new features or codepaths have appropriate test coverage
17+
- `go test ./...` passes
18+
- `go vet ./...` passes
19+
- `staticcheck ./...` passes
20+
- `golint ./...` returns no warnings, including documentation comment warnings
21+
22+
In addition, if this is your first time contributing to the `go-openvswitch` project,
23+
add your name and email address to the
24+
[AUTHORS](https://github.com/digitalocean/go-openvswitch/blob/master/AUTHORS) file
25+
under the "Contributors" section using the format:
26+
`First Last <[email protected]>`.
27+
28+
Finally, submit a pull request for review!

ovs/doc.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Copyright 2017 DigitalOcean.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// Package ovs is a client library for Open vSwitch which enables programmatic control of the virtual switch.
16+
package ovs

scripts/license.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Copyright 2017 DigitalOcean.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.

scripts/licensecheck.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
# Verify that the correct license block is present in all Go source
4+
# files.
5+
EXPECTED=$(cat ./scripts/license.txt)
6+
7+
# Scan each Go source file for license.
8+
EXIT=0
9+
GOFILES=$(find . -name "*.go")
10+
11+
for FILE in $GOFILES; do
12+
BLOCK=$(head -n 14 $FILE)
13+
14+
if [ "$BLOCK" != "$EXPECTED" ]; then
15+
echo "file missing license: $FILE"
16+
EXIT=1
17+
fi
18+
done
19+
20+
exit $EXIT

0 commit comments

Comments
 (0)