Skip to content

Commit

Permalink
fix: recover version test before gen api client
Browse files Browse the repository at this point in the history
  • Loading branch information
LinZexiao committed Dec 29, 2022
1 parent 41b90c0 commit e29530a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
8 changes: 4 additions & 4 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ func New(url string) (*Client, error) {
SetHostURL(url).
SetHeader("Accept", "application/json")

// _, err := client.R().Get("/version")
// if err != nil {
// return nil, fmt.Errorf("failed to connect to %s: %w", url, err)
// }
_, err := client.R().Get("/version")
if err != nil {
return nil, fmt.Errorf("failed to connect to %s: %w", url, err)
}

client.SetAllowGetMethodPayload(true)

Expand Down
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,22 @@ require (
github.com/BurntSushi/toml v1.2.1
github.com/docker/go-units v0.4.0
github.com/filecoin-project/go-address v1.1.0
github.com/filecoin-project/go-bitfield v0.2.4
github.com/filecoin-project/go-fil-markets v1.25.0
github.com/filecoin-project/go-state-types v0.10.0-alpha-2
github.com/filecoin-project/specs-actors/v2 v2.3.6
github.com/filecoin-project/venus v1.8.1-0.20221213072628-2c129f3a24a0
github.com/filecoin-project/venus-messager v1.8.0
github.com/gin-gonic/gin v1.8.1
github.com/go-resty/resty/v2 v2.4.0
github.com/google/uuid v1.3.0
github.com/ipfs-force-community/venus-common-utils v0.0.0-20220217030526-e5e4c6bc14f7
github.com/ipfs/go-cid v0.2.0
github.com/ipfs/go-log v1.0.5
github.com/ipfs/go-log/v2 v2.5.1
github.com/libp2p/go-libp2p v0.22.0
github.com/mitchellh/go-homedir v1.1.0
github.com/multiformats/go-multiaddr v0.6.0
github.com/urfave/cli/v2 v2.23.5
github.com/whyrusleeping/cbor-gen v0.0.0-20220514204315-f29c37e9c44c
go.uber.org/fx v1.15.0
Expand All @@ -40,7 +45,6 @@ require (
github.com/filecoin-project/go-amt-ipld/v2 v2.1.1-0.20201006184820-924ee87a1349 // indirect
github.com/filecoin-project/go-amt-ipld/v3 v3.1.0 // indirect
github.com/filecoin-project/go-amt-ipld/v4 v4.0.0 // indirect
github.com/filecoin-project/go-bitfield v0.2.4 // indirect
github.com/filecoin-project/go-cbor-util v0.0.1 // indirect
github.com/filecoin-project/go-data-transfer v1.15.2 // indirect
github.com/filecoin-project/go-hamt-ipld v0.1.5 // indirect
Expand All @@ -49,7 +53,6 @@ require (
github.com/filecoin-project/go-jsonrpc v0.1.8 // indirect
github.com/filecoin-project/go-padreader v0.0.1 // indirect
github.com/filecoin-project/specs-actors v0.9.15 // indirect
github.com/filecoin-project/specs-actors/v2 v2.3.6 // indirect
github.com/filecoin-project/specs-actors/v3 v3.1.2 // indirect
github.com/filecoin-project/specs-actors/v4 v4.0.2 // indirect
github.com/filecoin-project/specs-actors/v5 v5.0.6 // indirect
Expand All @@ -68,7 +71,6 @@ require (
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/hannahhoward/cbor-gen-for v0.0.0-20200817222906-ea96cece81f1 // indirect
github.com/hannahhoward/go-pubsub v0.0.0-20200423002714-8d62886cc36e // indirect
Expand Down Expand Up @@ -97,7 +99,6 @@ require (
github.com/leodido/go-urn v1.2.1 // indirect
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
github.com/libp2p/go-flow-metrics v0.1.0 // indirect
github.com/libp2p/go-libp2p v0.22.0 // indirect
github.com/libp2p/go-libp2p-core v0.20.0 // indirect
github.com/libp2p/go-libp2p-pubsub v0.8.0 // indirect
github.com/libp2p/go-msgio v0.2.0 // indirect
Expand All @@ -111,7 +112,6 @@ require (
github.com/mr-tron/base58 v1.2.0 // indirect
github.com/multiformats/go-base32 v0.0.4 // indirect
github.com/multiformats/go-base36 v0.1.0 // indirect
github.com/multiformats/go-multiaddr v0.6.0 // indirect
github.com/multiformats/go-multibase v0.1.1 // indirect
github.com/multiformats/go-multicodec v0.5.0 // indirect
github.com/multiformats/go-multihash v0.2.1 // indirect
Expand Down
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,7 @@ github.com/libp2p/go-tcp-transport v0.1.0/go.mod h1:oJ8I5VXryj493DEJ7OsBieu8fcg2
github.com/libp2p/go-testutil v0.1.0/go.mod h1:81b2n5HypcVyrCg/MJx4Wgfp/VHojytjVe/gLzZ2Ehc=
github.com/libp2p/go-ws-transport v0.1.0/go.mod h1:rjw1MG1LU9YDC6gzmwObkPd/Sqwhw7yT74kj3raBFuo=
github.com/libp2p/go-yamux v1.2.2/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow=
github.com/libp2p/go-yamux v1.2.3 h1:xX8A36vpXb59frIzWFdEgptLMsOANMFq2K7fPRlunYI=
github.com/libp2p/go-yamux v1.2.3/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow=
github.com/libp2p/go-yamux/v3 v3.1.2 h1:lNEy28MBk1HavUAlzKgShp+F6mn/ea1nDYWftZhFW9Q=
github.com/lucas-clemente/quic-go v0.28.1 h1:Uo0lvVxWg5la9gflIF9lwa39ONq85Xq2D91YNEIslzU=
Expand Down

0 comments on commit e29530a

Please sign in to comment.