Skip to content

Commit

Permalink
Testing travis (#4)
Browse files Browse the repository at this point in the history
* Travis
  • Loading branch information
markphelps committed Mar 25, 2018
1 parent dae31b7 commit 5541f70
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 11 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
language: go
go: "1.10"

install: true
before_script: make setup
script: make ci
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ setup: ## Install all the build and lint dependencies
go get -u github.com/golang/dep/cmd/dep
go get -u github.com/alecthomas/gometalinter
go get -u golang.org/x/tools/cmd/cover
gometalinter --install --update
gometalinter --install

.PHONY: dep
dep: ## Install all import dependencies
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Optional

[![Build Status](https://travis-ci.org/markphelps/optional.svg?branch=master)](https://travis-ci.org/markphelps/optional)
[![Release](https://img.shields.io/github/release/markphelps/optional.svg?style=flat-square)](https://github.com/markphelps/optional/releases/latest)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
[![Go Doc](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square)](http://godoc.org/github.com/markphelps/optional)
Expand Down
4 changes: 2 additions & 2 deletions cmd/optional/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ const tmpl = `// Code generated by go generate
package {{ .PackageName }}
import (
"encoding/json"
"errors"
"encoding/json"
"errors"
)
// {{ .OutputName }} is an optional {{ .TypeName }}
Expand Down
2 changes: 1 addition & 1 deletion cmd/optional/testdata/optional_bar.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cmd/optional/testdata/optional_foo.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cmd/optional/testdata/string.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/markphelps/optional"
)

func Example_Get() {
func Example_get() {
values := []optional.String{
optional.NewString("foo"),
optional.NewString(""),
Expand All @@ -30,7 +30,7 @@ func Example_Get() {
// bar
}

func Example_OrElse() {
func Example_orElse() {
values := []optional.String{
optional.NewString("foo"),
optional.NewString(""),
Expand All @@ -49,7 +49,7 @@ func Example_OrElse() {
// not present
}

func Example_If() {
func Example_if() {
values := []optional.String{
optional.NewString("foo"),
optional.NewString(""),
Expand All @@ -69,7 +69,7 @@ func Example_If() {
// present
}

func Example_MarshalJSON() {
func Example_marshalJSON() {
var values = []struct {
Field optional.String `json:"field,omitempty"`
}{
Expand All @@ -96,7 +96,7 @@ func Example_MarshalJSON() {
// {"field":"bar"}
}

func Example_UnmarshalJSON() {
func Example_unmarshalJSON() {
var values = []string{
`{"field":"foo"}`,
`{"field":""}`,
Expand Down

0 comments on commit 5541f70

Please sign in to comment.