Skip to content

Commit

Permalink
Merge pull request #11055 from jingyih/fix_gofmt_bom
Browse files Browse the repository at this point in the history
*: Fix gofmt bom
  • Loading branch information
gyuho authored Aug 20, 2019
2 parents 94745a4 + ffb43df commit 7f067ce
Show file tree
Hide file tree
Showing 12 changed files with 64 additions and 56 deletions.
36 changes: 27 additions & 9 deletions bill-of-materials.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"licenses": [
{
"type": "BSD 3-clause \"New\" or \"Revised\" License",
"confidence": 0.9090909090909091
"confidence": 0.9163346613545816
}
]
},
Expand All @@ -121,7 +121,7 @@
"licenses": [
{
"type": "BSD 3-clause \"New\" or \"Revised\" License",
"confidence": 0.92
"confidence": 0.9663865546218487
}
]
},
Expand All @@ -134,6 +134,15 @@
}
]
},
{
"project": "github.com/google/uuid",
"licenses": [
{
"type": "BSD 3-clause \"New\" or \"Revised\" License",
"confidence": 0.9663865546218487
}
]
},
{
"project": "github.com/gorilla/websocket",
"licenses": [
Expand All @@ -143,6 +152,15 @@
}
]
},
{
"project": "github.com/grpc-ecosystem/go-grpc-middleware",
"licenses": [
{
"type": "Apache License 2.0",
"confidence": 1
}
]
},
{
"project": "github.com/grpc-ecosystem/go-grpc-prometheus",
"licenses": [
Expand All @@ -164,10 +182,6 @@
{
"project": "github.com/inconshreveable/mousetrap",
"licenses": [
{
"type": "MIT License and BSD 3-clause \"New\" or \"Revised\" License",
"confidence": 1
},
{
"type": "Apache License 2.0",
"confidence": 1
Expand Down Expand Up @@ -418,7 +432,7 @@
]
},
{
"project": "google.golang.org/genproto/googleapis/rpc/status",
"project": "google.golang.org/genproto/googleapis",
"licenses": [
{
"type": "Apache License 2.0",
Expand Down Expand Up @@ -448,8 +462,8 @@
"project": "gopkg.in/yaml.v2",
"licenses": [
{
"type": "The Unlicense",
"confidence": 0.35294117647058826
"type": "Apache License 2.0",
"confidence": 1
},
{
"type": "MIT License",
Expand All @@ -460,6 +474,10 @@
{
"project": "sigs.k8s.io/yaml",
"licenses": [
{
"type": "Apache License 2.0",
"confidence": 1
},
{
"type": "BSD 3-clause \"New\" or \"Revised\" License",
"confidence": 1
Expand Down
2 changes: 1 addition & 1 deletion clientv3/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ import (
"sync"
"time"

"github.com/google/uuid"
"github.com/coreos/etcd/clientv3/balancer"
"github.com/coreos/etcd/clientv3/balancer/picker"
"github.com/coreos/etcd/clientv3/balancer/resolver/endpoint"
"github.com/coreos/etcd/clientv3/credentials"
"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
"github.com/coreos/etcd/pkg/logutil"
"github.com/google/uuid"
"go.uber.org/zap"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
Expand Down
2 changes: 1 addition & 1 deletion clientv3/concurrency/election_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ package concurrency_test
import (
"context"
"log"
"strings"
"testing"
"time"
"strings"

"github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/clientv3/concurrency"
Expand Down
22 changes: 11 additions & 11 deletions embed/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,17 +273,17 @@ func NewConfig() *Config {
TickMs: 100,
ElectionMs: 1000,
InitialElectionTickAdvance: true,
LPUrls: []url.URL{*lpurl},
LCUrls: []url.URL{*lcurl},
APUrls: []url.URL{*apurl},
ACUrls: []url.URL{*acurl},
ClusterState: ClusterStateFlagNew,
InitialClusterToken: "etcd-cluster",
StrictReconfigCheck: DefaultStrictReconfigCheck,
LogOutput: DefaultLogOutput,
Metrics: "basic",
EnableV2: DefaultEnableV2,
AuthToken: "simple",
LPUrls: []url.URL{*lpurl},
LCUrls: []url.URL{*lcurl},
APUrls: []url.URL{*apurl},
ACUrls: []url.URL{*acurl},
ClusterState: ClusterStateFlagNew,
InitialClusterToken: "etcd-cluster",
StrictReconfigCheck: DefaultStrictReconfigCheck,
LogOutput: DefaultLogOutput,
Metrics: "basic",
EnableV2: DefaultEnableV2,
AuthToken: "simple",
}
cfg.InitialCluster = cfg.InitialClusterFromName(cfg.Name)
return cfg
Expand Down
10 changes: 5 additions & 5 deletions etcdserver/api/v2http/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ func handleV2(mux *http.ServeMux, server etcdserver.ServerV2, timeout time.Durat
}

mh := &membersHandler{
sec: sec,
server: server,
cluster: server.Cluster(),
timeout: timeout,
clock: clockwork.NewRealClock(),
sec: sec,
server: server,
cluster: server.Cluster(),
timeout: timeout,
clock: clockwork.NewRealClock(),
clientCertAuthEnabled: server.ClientCertAuthEnabled(),
}

Expand Down
2 changes: 1 addition & 1 deletion etcdserver/api/v3rpc/watch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@ func createResponse(dataSize, events int) (resp *pb.WatchResponse) {
}
}
return resp
}
}
4 changes: 2 additions & 2 deletions etcdserver/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ func TestWALDir(t *testing.T) {

func TestShouldDiscover(t *testing.T) {
tests := map[string]bool{
"": false,
"foo": true,
"": false,
"foo": true,
"http://discovery.etcd.io/asdf": true,
}
for durl, w := range tests {
Expand Down
8 changes: 4 additions & 4 deletions functional/agent/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ func NewServer(
address string,
) *Server {
return &Server{
lg: lg,
network: network,
address: address,
last: rpcpb.Operation_NOT_STARTED,
lg: lg,
network: network,
address: address,
last: rpcpb.Operation_NOT_STARTED,
advertiseClientPortToProxy: make(map[int]proxy.Server),
advertisePeerPortToProxy: make(map[int]proxy.Server),
}
Expand Down
2 changes: 1 addition & 1 deletion mvcc/backend/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ func (b *backend) Defrag() error {

func (b *backend) defrag() error {
now := time.Now()

// TODO: make this non-blocking?
// lock batchTx to ensure nobody is using previous tx, and then
// close previous ongoing tx.
Expand Down
12 changes: 6 additions & 6 deletions pkg/testutil/leak.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ func CheckAfterTest(d time.Duration) error {
}
var bad string
badSubstring := map[string]string{
").writeLoop(": "a Transport",
").writeLoop(": "a Transport",
"created by net/http/httptest.(*Server).Start": "an httptest.Server",
"timeoutHandler": "a TimeoutHandler",
"net.(*netFD).connect(": "a timing out dial",
").noteClientGone(": "a closenotifier sender",
").readLoop(": "a Transport",
".grpc": "a gRPC resource",
"timeoutHandler": "a TimeoutHandler",
"net.(*netFD).connect(": "a timing out dial",
").noteClientGone(": "a closenotifier sender",
").readLoop(": "a Transport",
".grpc": "a gRPC resource",
}

var stacks string
Expand Down
8 changes: 4 additions & 4 deletions proxy/httpproxy/reverse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,10 @@ func TestRemoveSingleHopHeaders(t *testing.T) {
"Keep-Alive": {"foo"},
"Proxy-Authenticate": {"Basic realm=example.com"},
"Proxy-Authorization": {"foo"},
"Te": {"deflate,gzip"},
"Trailers": {"ETag"},
"Transfer-Encoding": {"chunked"},
"Upgrade": {"WebSocket"},
"Te": {"deflate,gzip"},
"Trailers": {"ETag"},
"Transfer-Encoding": {"chunked"},
"Upgrade": {"WebSocket"},

// headers that should persist
"Accept": {"application/json"},
Expand Down
12 changes: 1 addition & 11 deletions scripts/updatebom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,9 @@ fi
echo "installing 'bill-of-materials.json'"
go get -v -u github.com/coreos/license-bill-of-materials

echo "setting up GOPATH"
rm -rf ./gopath
mkdir ./gopath
mv ./cmd/vendor ./gopath/src

echo "generating bill-of-materials.json"
GOPATH=$(pwd)/gopath license-bill-of-materials \
license-bill-of-materials \
--override-file ./bill-of-materials.override.json \
github.com/coreos/etcd github.com/coreos/etcd/etcdctl > bill-of-materials.json

echo "reverting GOPATH,vendor"
mv ./gopath/src ./cmd/vendor
rm -rf ./gopath

echo "generated bill-of-materials.json"

0 comments on commit 7f067ce

Please sign in to comment.