Skip to content

Commit

Permalink
Upgrade enry to v2.0.0 and switch to go modules
Browse files Browse the repository at this point in the history
  • Loading branch information
kuba-- committed May 31, 2019
1 parent 1429cba commit f54b116
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 24 deletions.
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
language: go
env:
global:
- GO111MODULE=on

matrix:
include:
- go: 1.x
- go: 1.11.x
env: DEPLOY_BUILD=true
- go: tip

install:
- go get -u github.com/golang/dep/cmd/dep
- dep ensure
- go get -u golang.org/x/tools/cmd/goimports
- go get -v

Expand Down
11 changes: 0 additions & 11 deletions Gopkg.toml

This file was deleted.

14 changes: 5 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
.PHONY: test build

build:
go build
mkdir -p bin
go build -o ./bin/gocloc cmd/gocloc/main.go

update-vendor:
dep ensure
GO111MODULE=on go build -o ./bin/gocloc cmd/gocloc/main.go

update-package:
go get -u github.com/hhatto/gocloc
GO111MODULE=on go get -u github.com/hhatto/gocloc

run-example:
go run examples/languages.go
go run examples/files.go
GO111MODULE=on go run examples/languages.go
GO111MODULE=on go run examples/files.go

test:
go test -v
GO111MODULE=on go test -v
8 changes: 8 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module github.com/hhatto/gocloc

go 1.12

require (
github.com/jessevdk/go-flags v1.4.0
github.com/src-d/enry/v2 v2.0.0
)
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/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA=
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
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/src-d/enry/v2 v2.0.0 h1:2ADqfDHhroFwL1RGhMS9e15NkEwln8P4AABwVvIdAlo=
github.com/src-d/enry/v2 v2.0.0/go.mod h1:qQeCMRwzMF3ckeGr+h0tJLdxXnq+NVZsIDMELj0t028=
github.com/src-d/go-oniguruma v1.1.0 h1:EG+Nm5n2JqWUaCjtM0NtutPxU7ZN5Tp50GWrrV8bTww=
github.com/src-d/go-oniguruma v1.1.0/go.mod h1:chVbff8kcVtmrhxtZ3yBVLLquXbzCS6DrxQaAK/CeqM=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/toqueteos/trie v1.0.0 h1:8i6pXxNUXNRAqP246iibb7w/pSFquNTQ+uNfriG7vlk=
github.com/toqueteos/trie v1.0.0/go.mod h1:Ywk48QhEqhU1+DwhMkJ2x7eeGxDHiGkAdc9+0DYcbsM=
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/toqueteos/substring.v1 v1.0.2 h1:urLqCeMm6x/eTuQa1oZerNw8N1KNOIp5hD5kGL7lFsE=
gopkg.in/toqueteos/substring.v1 v1.0.2/go.mod h1:Eb2Z1UYehlVK8LYW2WBVR2rwbujsz3aX8XDrM1vbNew=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
2 changes: 1 addition & 1 deletion language.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"strings"
"unicode"

enry "gopkg.in/src-d/enry.v1"
enry "github.com/src-d/enry/v2"
)

// ClocLanguage is provide for xml-cloc and json format
Expand Down

0 comments on commit f54b116

Please sign in to comment.