Skip to content

Commit 19c177c

Browse files
author
Ameer A
authored
Merge pull request #60 from ojizero/gomod
Moving Vice to gomod and general housecleaning
2 parents 660007f + 529f6b1 commit 19c177c

File tree

12 files changed

+3206
-1723
lines changed

12 files changed

+3206
-1723
lines changed

.github/workflows/ci.yaml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
go-test:
8+
strategy:
9+
matrix:
10+
go-version:
11+
- 1.18.x
12+
- 1.17.x
13+
name: Go test
14+
runs-on: ubuntu-latest
15+
services:
16+
redis:
17+
image: "redis:7"
18+
ports:
19+
- "6379:6379"
20+
rabbitmq:
21+
image: "rabbitmq:3"
22+
ports:
23+
- "5672:5672"
24+
nsq:
25+
image: "nsqio/nsq:v1.0.0-compat"
26+
ports:
27+
- "4150:4150"
28+
options: --entrypoint nsqd
29+
nats:
30+
image: "nats-streaming:0.5.0"
31+
ports:
32+
- "4222:4222"
33+
steps:
34+
- name: Setup Go
35+
uses: actions/setup-go@v3
36+
with:
37+
go-version: ${{ matrix.go-version }}
38+
39+
- name: Get source
40+
uses: actions/checkout@v3
41+
42+
- name: Go test
43+
run: go test -v -timeout 30s -race ./...
44+
45+
go-vet:
46+
name: Go vet
47+
runs-on: ubuntu-latest
48+
steps:
49+
- name: Setup Go
50+
uses: actions/setup-go@v3
51+
with:
52+
go-version: 1.18.x
53+
54+
- name: Get source
55+
uses: actions/checkout@v3
56+
57+
- name: Go vet
58+
run: go vet ./...
59+
60+
golint:
61+
name: Golint
62+
runs-on: ubuntu-latest
63+
steps:
64+
- name: Setup Go
65+
uses: actions/setup-go@v3
66+
with:
67+
go-version: 1.18.x
68+
69+
- name: Get source
70+
uses: actions/checkout@v3
71+
72+
- name: Go get golint
73+
run: go mod download
74+
75+
- name: Golint
76+
run: go run golang.org/x/lint/golint -set_exit_status ./...
77+
78+
staticcheck:
79+
name: Staticcheck
80+
runs-on: ubuntu-latest
81+
steps:
82+
- name: Setup Go
83+
uses: actions/setup-go@v3
84+
with:
85+
go-version: 1.18.x
86+
87+
- name: Get source
88+
uses: actions/checkout@v3
89+
90+
- name: Go get staticcheck
91+
run: go mod download
92+
93+
- name: Golint
94+
run: go run honnef.co/go/tools/cmd/staticcheck ./...

.travis.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

example/greeter/service/main.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ import (
1313
// Send a name: curl -d 'Mat' 'http://127.0.0.1:4151/pub?topic=names'
1414

1515
// Greeter is a service that greets people.
16-
func Greeter(ctx context.Context, names <-chan []byte,
17-
greetings chan<- []byte, errs <-chan error) {
16+
func Greeter(ctx context.Context, names <-chan []byte, greetings chan<- []byte, errs <-chan error) {
1817
for {
1918
select {
2019
case <-ctx.Done():

go.mod

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
module github.com/matryer/vice
2+
3+
go 1.17
4+
5+
require (
6+
github.com/aws/aws-sdk-go v1.44.16
7+
github.com/go-redis/redis v6.15.9+incompatible
8+
github.com/gofrs/uuid v4.2.0+incompatible
9+
github.com/matryer/is v1.4.0
10+
github.com/maxbrunsfeld/counterfeiter/v6 v6.5.0
11+
github.com/nats-io/nats.go v1.15.0
12+
github.com/nats-io/stan.go v0.10.2
13+
github.com/nsqio/go-nsq v1.1.0
14+
github.com/streadway/amqp v1.0.0
15+
github.com/stretchr/testify v1.7.1
16+
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616
17+
honnef.co/go/tools v0.3.2
18+
)
19+
20+
require (
21+
github.com/BurntSushi/toml v0.4.1 // indirect
22+
github.com/davecgh/go-spew v1.1.1 // indirect
23+
github.com/gogo/protobuf v1.3.2 // indirect
24+
github.com/golang/snappy v0.0.1 // indirect
25+
github.com/jmespath/go-jmespath v0.4.0 // indirect
26+
github.com/kr/pretty v0.3.0 // indirect
27+
github.com/nats-io/nats-server/v2 v2.8.2 // indirect
28+
github.com/nats-io/nats-streaming-server v0.24.6 // indirect
29+
github.com/nats-io/nkeys v0.3.0 // indirect
30+
github.com/nats-io/nuid v1.0.1 // indirect
31+
github.com/onsi/ginkgo v1.16.5 // indirect
32+
github.com/onsi/gomega v1.19.0 // indirect
33+
github.com/pmezard/go-difflib v1.0.0 // indirect
34+
golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd // indirect
35+
golang.org/x/exp/typeparams v0.0.0-20220218215828-6cf2b201936e // indirect
36+
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
37+
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect
38+
golang.org/x/tools v0.1.11-0.20220513221640-090b14e8501f // indirect
39+
google.golang.org/protobuf v1.28.0 // indirect
40+
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
41+
)

0 commit comments

Comments
 (0)