Skip to content

Commit 536da9e

Browse files
authored
Merge pull request #150 from zquestz/go-modules
Add go module support
2 parents bce10d1 + 6bbc5f3 commit 536da9e

File tree

7 files changed

+315
-288
lines changed

7 files changed

+315
-288
lines changed

.travis.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
language: go
22
go:
3-
- '1.7.5'
4-
- '1.8.3'
5-
- '1.9'
6-
- '1.10'
7-
- '1.11'
3+
- 1.15.8
4+
- 1.16
85
- tip
96
os:
107
- linux
@@ -18,10 +15,10 @@ script:
1815
- go test -i -race ./...
1916
- go test -v -race ./...
2017
after_script:
21-
- if [ "$TRAVIS_GO_VERSION" = "1.11" ] && [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$TRAVIS_TAG" != "" ]; then go get github.com/inconshreveable/mousetrap; fi
22-
- if [ "$TRAVIS_GO_VERSION" = "1.11" ] && [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$TRAVIS_TAG" != "" ]; then go get github.com/mitchellh/gox; fi
23-
- if [ "$TRAVIS_GO_VERSION" = "1.11" ] && [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$TRAVIS_TAG" != "" ]; then go get github.com/tcnksm/ghr; fi
24-
- if [ "$TRAVIS_GO_VERSION" = "1.11" ] && [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$TRAVIS_TAG" != "" ]; then make compile; ghr --username zquestz --token $GITHUB_TOKEN --replace $TRAVIS_TAG pkg/; fi
18+
- if [ "$TRAVIS_GO_VERSION" = "1.16" ] && [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$TRAVIS_TAG" != "" ]; then go get github.com/inconshreveable/mousetrap; fi
19+
- if [ "$TRAVIS_GO_VERSION" = "1.16" ] && [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$TRAVIS_TAG" != "" ]; then go get github.com/mitchellh/gox; fi
20+
- if [ "$TRAVIS_GO_VERSION" = "1.16" ] && [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$TRAVIS_TAG" != "" ]; then go get github.com/tcnksm/ghr; fi
21+
- if [ "$TRAVIS_GO_VERSION" = "1.16" ] && [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$TRAVIS_TAG" != "" ]; then make compile; ghr --username zquestz --token $GITHUB_TOKEN --replace $TRAVIS_TAG pkg/; fi
2522
notifications:
2623
webhooks:
2724
urls:

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ APPNAME = s
22
OUTDIR = pkg
33

44
# Allow user to override cross compilation scope
5-
OSARCH ?= darwin/386 darwin/amd64 dragonfly/amd64 freebsd/386 freebsd/amd64 freebsd/arm linux/386 linux/amd64 linux/arm netbsd/386 netbsd/amd64 netbsd/arm openbsd/386 openbsd/amd64 plan9/386 plan9/amd64 solaris/amd64 windows/386 windows/amd64
6-
DIRS ?= darwin_386 darwin_amd64 dragonfly_amd64 freebsd_386 freebsd_amd64 freebsd_arm linux_386 linux_amd64 linux_arm netbsd_386 netbsd_amd64 netbsd_arm openbsd_386 openbsd_amd64 plan9_386 plan9_amd64 solaris_amd64 windows_386 windows_amd64
5+
OSARCH ?= darwin/amd64 darwin/arm64 dragonfly/amd64 freebsd/386 freebsd/amd64 freebsd/arm linux/386 linux/amd64 linux/arm netbsd/386 netbsd/amd64 netbsd/arm openbsd/386 openbsd/amd64 plan9/386 plan9/amd64 solaris/amd64 windows/386 windows/amd64
6+
DIRS ?= darwin_amd64 darwin_arm64 dragonfly_amd64 freebsd_386 freebsd_amd64 freebsd_arm linux_386 linux_amd64 linux_arm netbsd_386 netbsd_amd64 netbsd_arm openbsd_386 openbsd_amd64 plan9_386 plan9_amd64 solaris_amd64 windows_386 windows_amd64
77

88
all:
99
go build .

README.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,6 @@ make
3131
make install
3232
```
3333

34-
If you have issues building s, you can vendor the dependencies by using [gvt](https://github.com/FiloSottile/gvt):
35-
36-
```
37-
go get -u github.com/FiloSottile/gvt
38-
cd $GOPATH/src/github.com/zquestz/s
39-
gvt restore
40-
```
41-
4234
Alternatively, you can use Homebrew:
4335

4436
```
@@ -340,7 +332,7 @@ s is released under the MIT license.
340332
[ReportCard-Image]: https://goreportcard.com/badge/github.com/zquestz/s
341333
[Build-Status-URL]: http://travis-ci.org/zquestz/s
342334
[Build-Status-Image]: https://travis-ci.org/zquestz/s.svg?branch=master
343-
[Release-URL]: https://github.com/zquestz/s/releases/tag/v0.5.14
344-
[Release-Image]: http://img.shields.io/badge/release-v0.5.14-1eb0fc.svg
335+
[Release-URL]: https://github.com/zquestz/s/releases/tag/v0.5.15
336+
[Release-Image]: http://img.shields.io/badge/release-v0.5.15-1eb0fc.svg
345337
[Chat-Image]: https://badges.gitter.im/zquestz/s.svg
346338
[Chat-URL]: https://gitter.im/zquestz/s?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge

cmd/search.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414

1515
const (
1616
appName = "s"
17-
version = "0.5.14"
17+
version = "0.5.15"
1818
defaultPort = 8080
1919
defaultProvider = "google"
2020
)

go.mod

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module github.com/zquestz/s
2+
3+
go 1.16
4+
5+
require (
6+
github.com/NYTimes/gziphandler v1.1.1
7+
github.com/mitchellh/go-homedir v1.1.0
8+
github.com/spf13/cobra v1.1.3
9+
github.com/zquestz/go-ucl v0.0.0-20160305052752-ec59c7af0062
10+
golang.org/x/text v0.3.5
11+
)

0 commit comments

Comments
 (0)