Skip to content

Commit

Permalink
Merge a644cd1 into 1bfa053
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanberkner committed Apr 14, 2020
2 parents 1bfa053 + a644cd1 commit a040d8f
Show file tree
Hide file tree
Showing 37 changed files with 26,981 additions and 109 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@

# own stuff
coverage
vendor
coverage.*
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,19 @@ sudo: false
language: go

go:
- 1.12.x
- 1.14.x

before_script:
- go get -u golang.org/x/lint/golint
- go get -u github.com/golang/dep/cmd/dep
- go get golang.org/x/tools/cmd/cover
- go get github.com/mattn/goveralls
- go mod vendor

script:
- make lint
- make test
- make race
- make coverage
- go test $(shell go list ./... | grep -v /vendor/) -race -coverprofile=coverage.txt -covermode=atomic

after_success:
- $GOPATH/bin/goveralls -service=travis-ci
# - bash <(curl -s https://codecov.io/bash)
33 changes: 0 additions & 33 deletions Gopkg.lock

This file was deleted.

30 changes: 0 additions & 30 deletions Gopkg.toml

This file was deleted.

47 changes: 13 additions & 34 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,47 +1,26 @@
# GO - all golang related commands -------------------------------------------------------------------------------------
.PHONY: lint test race coverage upgrade help

LIST_ALL := $(shell go list ./... | grep -v /vendor/ | grep -v mocks)

all: lint test race
export GOFLAGS=-mod=vendor

.PHONY: install
install: ## Install the dependencies (via dep)
@dep ensure

.PHONY: update
update: ## Update the dependencies (via dep)
@dep ensure -update

.PHONY: lint
lint: ## Lint all files (via golint)
@go fmt ${LIST_ALL}
@golint -set_exit_status ${LIST_ALL}

.PHONY: test
test: install ## Run unit tests
@go test -short ${LIST_ALL}

.PHONY: race
race: install ## Run data race detector
@go test -race -short ${LIST_ALL}

.PHONY: coverage
coverage: install ## Generate coverage report
@go test ${LIST_ALL} -coverprofile coverage.out
@go tool cover -func coverage.out
@mkdir -p coverage
@go tool cover -html=coverage.out -o coverage/index.html
test: ## Run unittests
@go test -short -count 1 -v ./...

.PHONY: report
report: coverage ## Open the coverage report in browser
@go tool cover -html=coverage.out
race: ## Run data race detector
@go test -race -short -count 1 -v ./...

.PHONY: clean
clean: ## Remove files around coverage report
@rm -f coverage.out
@rm -rf coverage/
coverage: ## Generate test coverage
@go test -coverprofile coverage.txt ./...
@go tool cover -func=coverage.txt

# ----------------------------------------------------------------------------------------------------------------------
upgrade: ## Upgrade go dependencies
@GOFLAGS='' go get -u -t ./...
@go mod tidy
@go mod vendor

.PHONY: help
help: ## Display this help screen
Expand Down
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ is a translation of the php implementation of
To get the lastest tagged version of package, execute:

```
go get gopkg.in/Regis24GmbH/go-phonetics.v1
go get gopkg.in/Regis24GmbH/go-phonetics.v2
```

To import this package, add the following line to your code:

```
import "gopkg.in/Regis24GmbH/go-phonetics.v1"
import "gopkg.in/Regis24GmbH/go-phonetics.v2"
```

This is a code example:
Expand All @@ -41,10 +41,6 @@ func main() {
}
```

## Misc

Special thanks to [@stefanberkner](https://github.com/stefanberkner)

***

[travis-image]: https://travis-ci.org/Regis24GmbH/go-phonetics.svg?branch=master
Expand Down
5 changes: 5 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module gopkg.in/Regis24GmbH/go-phonetics.v2

go 1.14

require gopkg.in/Regis24GmbH/go-diacritics.v2 v2.0.1
20 changes: 20 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
gopkg.in/Regis24GmbH/go-diacritics.v2 v2.0.1 h1:uG05x6RPEde9P5EAMSLU106llP42DBWziFqN5ux1qRo=
gopkg.in/Regis24GmbH/go-diacritics.v2 v2.0.1/go.mod h1:1jSFPHb960GMUSQ+KOWcZzjZzDCAjz4yDZVinB+tocA=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
2 changes: 1 addition & 1 deletion phonetics.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"regexp"
"strings"

godiacritics "gopkg.in/Regis24GmbH/go-diacritics.v1"
godiacritics "gopkg.in/Regis24GmbH/go-diacritics.v2"
)

// NewPhoneticCode takes a word an returns the phonetic code.
Expand Down
3 changes: 3 additions & 0 deletions vendor/golang.org/x/text/AUTHORS

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

3 changes: 3 additions & 0 deletions vendor/golang.org/x/text/CONTRIBUTORS

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

27 changes: 27 additions & 0 deletions vendor/golang.org/x/text/LICENSE

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

22 changes: 22 additions & 0 deletions vendor/golang.org/x/text/PATENTS

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

Loading

0 comments on commit a040d8f

Please sign in to comment.