diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f3e416e7..46796493 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,3 +11,15 @@ env: jobs: test: uses: SiaFoundation/workflows/.github/workflows/go-test.yml@master + analyze: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Jape Analyzer + uses: SiaFoundation/action-golang-analysis@HEAD + with: + analyzers: | + go.sia.tech/jape.Analyzer@master + directories: | + api diff --git a/api/client.go b/api/client.go index bd3e30a9..6ba02c3d 100644 --- a/api/client.go +++ b/api/client.go @@ -5,7 +5,6 @@ import ( "go.sia.tech/core/consensus" "go.sia.tech/core/types" - "go.sia.tech/coreutils/syncer" "go.sia.tech/explored/explorer" "go.sia.tech/jape" ) @@ -58,7 +57,7 @@ func (c *Client) SyncerConnect(addr string) (err error) { } // SyncerPeers returns the peers of the syncer. -func (c *Client) SyncerPeers() (resp []*syncer.Peer, err error) { +func (c *Client) SyncerPeers() (resp []string, err error) { err = c.c.GET("/syncer/peers", &resp) return } @@ -211,6 +210,6 @@ func (c *Client) HostMetrics() (resp explorer.HostMetrics, err error) { // Search returns what type of object an ID is. func (c *Client) Search(id types.Hash256) (resp explorer.SearchType, err error) { - err = c.c.GET(fmt.Sprintf("/search/%s", id), &resp) + err = c.c.GET(fmt.Sprintf("/search/%s", id.String()), &resp) return }