Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit178f470

Browse files
committed
Add Makefile, go.mod and travis.yml
1 parentf980bdb commit178f470

File tree

4 files changed

+50
-5
lines changed

4 files changed

+50
-5
lines changed

‎.travis.yml‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
language:go
2+
3+
go:
4+
-"1.11"
5+
6+
services:
7+
-docker
8+
9+
cache:
10+
directories:
11+
-${GOPATH}/pkg/mod
12+
13+
jobs:
14+
include:
15+
-stage:test
16+
if:type == pull_request
17+
script:make test
18+
env:
19+
-GO111MODULE=on
20+
21+
-stage:test_and_cover
22+
name:"Test (with coverage)"
23+
if:type != pull_request
24+
script:make cover publish_cover
25+
env:
26+
-GO111MODULE=on

‎Makefile‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
default: services test
2+
3+
.PHONY: test
4+
test:
5+
gotest ./...
6+
7+
.PHONY: cover
8+
cover:
9+
go list -f'{{if len .TestGoFiles}}"go test -coverprofile={{.Dir}}/.coverprofile {{.ImportPath}}"{{end}}' ./...| xargs -L 1 sh -c
10+
11+
.PHONY: publish_cover
12+
publish_cover: cover
13+
go get -d golang.org/x/tools/cmd/cover
14+
go get github.com/modocache/gover
15+
go get github.com/mattn/goveralls
16+
gover
17+
@goveralls -coverprofile=gover.coverprofile -service=travis-ci -repotoken=$(COVERALLS_TOKEN)
18+
19+
.PHONY: clean
20+
clean:
21+
@find. -name\.coverprofile -type f -delete
22+
@rm -f gover.coverprofile

‎README.md‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
[![wercker status](https://app.wercker.com/status/517d98fe7a8da9bf9a6060e7906c0d17/s"wercker status")](https://app.wercker.com/project/bykey/517d98fe7a8da9bf9a6060e7906c0d17)
1+
[![Build Status](https://travis-ci.com/looplab/fsm.svg?branch=master)](https://travis-ci.com/looplab/fsm)
22
[![Coverage Status](https://img.shields.io/coveralls/looplab/fsm.svg)](https://coveralls.io/r/looplab/fsm)
33
[![GoDoc](https://godoc.org/github.com/looplab/fsm?status.svg)](https://godoc.org/github.com/looplab/fsm)
44
[![Go Report Card](https://goreportcard.com/badge/looplab/fsm)](https://goreportcard.com/report/looplab/fsm)
55

6-
76
#FSM for Go
87

98
FSM is a finite state machine for Go.
@@ -16,7 +15,6 @@ It is heavily based on two FSM implementations:
1615

1716
For API docs and examples seehttp://godoc.org/github.com/looplab/fsm
1817

19-
2018
#Basic Example
2119

2220
From examples/simple.go:
@@ -57,7 +55,6 @@ func main() {
5755
}
5856
```
5957

60-
6158
#Usage as a struct field
6259

6360
From examples/struct.go:
@@ -113,7 +110,6 @@ func main() {
113110
}
114111
```
115112

116-
117113
#License
118114

119115
FSM is licensed under Apache License 2.0

‎go.mod‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
modulegithub.com/looplab/fsm

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp