Skip to content

Commit

Permalink
analyzer: trim trailing slash from IPFS gateway URL
Browse files Browse the repository at this point in the history
  • Loading branch information
pro-wh committed Sep 27, 2023
1 parent 5008670 commit 1ed1ae8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/analyzer/analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"fmt"
"os"
"os/signal"
"strings"
"sync"
"syscall"
"time"
Expand Down Expand Up @@ -215,7 +216,7 @@ func (s *sourceFactory) Runtime(ctx context.Context, runtime common.Runtime) (no

func (s *sourceFactory) IPFS(_ context.Context) (ipfsclient.Client, error) {
if s.ipfs == nil {
client, err := ipfsclient.NewGateway(s.cfg.IPFS.Gateway)
client, err := ipfsclient.NewGateway(strings.TrimSuffix(s.cfg.IPFS.Gateway, "/"))
if err != nil {
return nil, fmt.Errorf("error creating ipfs client: %w", err)
}
Expand Down

0 comments on commit 1ed1ae8

Please sign in to comment.