Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

Go modules #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
*~
**/main
*.swp
build/
coverage.txt
7 changes: 3 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
language: go
sudo: false
go:
- 1.x

before_install:
- go get -t -v ./...
- '1.13.x'
- '1.14.x'

script:
- ./test.sh
- go build -v -o build/easypki ./cmd/easypki

after_success:
- bash <(curl -s https://codecov.io/bash)
2 changes: 1 addition & 1 deletion cmd/easypki/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ import (

"encoding/pem"

"github.com/codegangsta/cli"
"github.com/google/easypki/pkg/certificate"
"github.com/google/easypki/pkg/easypki"
"github.com/google/easypki/pkg/store"
"github.com/urfave/cli"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion example/client-auth/client-auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import (
"os"
"time"

"github.com/boltdb/bolt"
"github.com/go-yaml/yaml"
"github.com/google/easypki/pkg/certificate"
"github.com/google/easypki/pkg/easypki"
"github.com/google/easypki/pkg/store"
bolt "go.etcd.io/bbolt"
)

func main() {
Expand Down
10 changes: 10 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module github.com/google/easypki

go 1.13

require (
github.com/go-yaml/yaml v2.1.0+incompatible
github.com/urfave/cli v1.22.4
go.etcd.io/bbolt v1.3.4
golang.org/x/sys v0.0.0-20200413165638-669c56c373c4 // indirect
)
22 changes: 22 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/go-yaml/yaml v2.1.0+incompatible h1:RYi2hDdss1u4YE7GwixGzWwVo47T8UQwnTLB6vQiq+o=
github.com/go-yaml/yaml v2.1.0+incompatible/go.mod h1:w2MrLa16VYP0jy6N7M5kHaCkaLENm+P+Tv+MfurjSw0=
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/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
github.com/urfave/cli v1.22.4 h1:u7tSpNPPswAFymm8IehJhy4uJMlUuU/GmqSkvJ1InXA=
github.com/urfave/cli v1.22.4/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
go.etcd.io/bbolt v1.3.4 h1:hi1bXHMVrlQh6WwxAy+qZCV/SYIlqo+Ushwdpa4tAKg=
go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200413165638-669c56c373c4 h1:opSr2sbRXk5X5/givKrrKj9HXxFpW2sdCiP8MJSKLQY=
golang.org/x/sys v0.0.0-20200413165638-669c56c373c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
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=
2 changes: 1 addition & 1 deletion pkg/easypki/easypki_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"testing"
"time"

"github.com/boltdb/bolt"
"github.com/google/easypki/pkg/store"
bolt "go.etcd.io/bbolt"

"reflect"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/store/bolt.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (

"fmt"

"github.com/boltdb/bolt"
"github.com/google/easypki/pkg/certificate"
bolt "go.etcd.io/bbolt"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion pkg/store/bolt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (

"reflect"

"github.com/boltdb/bolt"
"github.com/google/easypki/pkg/certificate"
bolt "go.etcd.io/bbolt"
)

func TestBolt(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/store/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ var (
// 4 Serial
// 5 Filename
// 6 Subject
indexRegexp = regexp.MustCompile("^(V|R|E)\t([0-9]{12}Z)\t([0-9]{12}Z)?\t([0-9a-fA-F]{2,})\t([^\t]+)\t(.+)")
indexRegexp = regexp.MustCompile("^([VRE])\t([0-9]{12}Z)\t([0-9]{12}Z)?\t([0-9a-fA-F]{2,})\t([^\t]+)\t(.+)")
)

// Local lets us store a Certificate Authority on the local filesystem.
Expand Down
9 changes: 5 additions & 4 deletions test.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#!/usr/bin/env bash

set -e
echo "" > coverage.txt
set -Eeuo pipefail

true > coverage.txt

for d in $(go list ./... | grep -v vendor); do
go test -race -coverprofile=profile.out -covermode=atomic $d
go test -race -coverprofile=profile.out -covermode=atomic "$d"
if [ -f profile.out ]; then
cat profile.out >> coverage.txt
rm profile.out
rm -f profile.out
fi
done