Skip to content

Commit 5541f70

Browse files
authored
Testing travis (#4)
* Travis
1 parent dae31b7 commit 5541f70

8 files changed

Lines changed: 18 additions & 11 deletions

File tree

.travis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
language: go
2+
go: "1.10"
3+
4+
install: true
5+
before_script: make setup
6+
script: make ci

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ setup: ## Install all the build and lint dependencies
33
go get -u github.com/golang/dep/cmd/dep
44
go get -u github.com/alecthomas/gometalinter
55
go get -u golang.org/x/tools/cmd/cover
6-
gometalinter --install --update
6+
gometalinter --install
77

88
.PHONY: dep
99
dep: ## Install all import dependencies

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Optional
22

3+
[![Build Status](https://travis-ci.org/markphelps/optional.svg?branch=master)](https://travis-ci.org/markphelps/optional)
34
[![Release](https://img.shields.io/github/release/markphelps/optional.svg?style=flat-square)](https://github.com/markphelps/optional/releases/latest)
45
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
56
[![Go Doc](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square)](http://godoc.org/github.com/markphelps/optional)

cmd/optional/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ const tmpl = `// Code generated by go generate
126126
package {{ .PackageName }}
127127
128128
import (
129-
"encoding/json"
130-
"errors"
129+
"encoding/json"
130+
"errors"
131131
)
132132
133133
// {{ .OutputName }} is an optional {{ .TypeName }}

cmd/optional/testdata/optional_bar.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/optional/testdata/optional_foo.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/optional/testdata/string.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"github.com/markphelps/optional"
88
)
99

10-
func Example_Get() {
10+
func Example_get() {
1111
values := []optional.String{
1212
optional.NewString("foo"),
1313
optional.NewString(""),
@@ -30,7 +30,7 @@ func Example_Get() {
3030
// bar
3131
}
3232

33-
func Example_OrElse() {
33+
func Example_orElse() {
3434
values := []optional.String{
3535
optional.NewString("foo"),
3636
optional.NewString(""),
@@ -49,7 +49,7 @@ func Example_OrElse() {
4949
// not present
5050
}
5151

52-
func Example_If() {
52+
func Example_if() {
5353
values := []optional.String{
5454
optional.NewString("foo"),
5555
optional.NewString(""),
@@ -69,7 +69,7 @@ func Example_If() {
6969
// present
7070
}
7171

72-
func Example_MarshalJSON() {
72+
func Example_marshalJSON() {
7373
var values = []struct {
7474
Field optional.String `json:"field,omitempty"`
7575
}{
@@ -96,7 +96,7 @@ func Example_MarshalJSON() {
9696
// {"field":"bar"}
9797
}
9898

99-
func Example_UnmarshalJSON() {
99+
func Example_unmarshalJSON() {
100100
var values = []string{
101101
`{"field":"foo"}`,
102102
`{"field":""}`,

0 commit comments

Comments
 (0)