Update name of latest distribution path const
gammazero committed
Mar 16, 2021 at 16:57 UTC
1430a0104c79eeddbfaa9e14cf2bb07ed73be9c2
3 files changed
+5
-5
repo/fsrepo/migrations/fetch_test.go
+1
-1
@@ -55,7 +55,7 @@ func createFakeArchive(name string, archZip bool, w io.Writer) {
55
func TestGetDistPath(t *testing.T) {
56
os.Unsetenv(envIpfsDistPath)
57
distPath := GetDistPathEnv("")
58
- if distPath != IpnsIpfsDist {
58
+ if distPath != LatestIpfsDist {
59
t.Error("did not set default dist path")
60
}
61
repo/fsrepo/migrations/fetcher.go
+3
-3
@@ -9,8 +9,8 @@ import (
9
const (
10
// Current dirstibution to fetch migrations from
11
CurrentIpfsDist = "/ipfs/Qme8pJhBidEUXRdpcWLGR2fkG5kdwVnaMh3kabjfP8zz7Y"
12
- // Distribution IPNS path. Default for fetchers.
13
- IpnsIpfsDist = "/ipns/dist.ipfs.io"
12
+ // Latest distribution path. Default for fetchers.
13
+ LatestIpfsDist = "/ipns/dist.ipfs.io"
14
15
// Distribution environ variable
16
envIpfsDistPath = "IPFS_DIST_PATH"
@@ -77,7 +77,7 @@ func GetDistPathEnv(distPath string) string {
77
return dist
78
}
79
if distPath == "" {
80
- return IpnsIpfsDist
80
+ return LatestIpfsDist
81
}
82
return distPath
83
}
repo/fsrepo/migrations/httpfetcher.go
+1
-1
@@ -32,7 +32,7 @@ var _ Fetcher = (*HttpFetcher)(nil)
32
// Specifying 0 for fetchLimit sets the default, -1 means no limit.
33
func NewHttpFetcher(distPath, gateway, userAgent string, fetchLimit int64) *HttpFetcher {
34
f := &HttpFetcher{
35
- distPath: IpnsIpfsDist,
35
+ distPath: LatestIpfsDist,
36
gateway: defaultGatewayURL,
37
limit: defaultFetchLimit,
38
}