mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-01 22:37:51 +08:00
Update name of latest distribution path const
This commit is contained in:
parent
077266d3bd
commit
1430a0104c
@ -55,7 +55,7 @@ func createFakeArchive(name string, archZip bool, w io.Writer) {
|
||||
func TestGetDistPath(t *testing.T) {
|
||||
os.Unsetenv(envIpfsDistPath)
|
||||
distPath := GetDistPathEnv("")
|
||||
if distPath != IpnsIpfsDist {
|
||||
if distPath != LatestIpfsDist {
|
||||
t.Error("did not set default dist path")
|
||||
}
|
||||
|
||||
|
||||
@ -9,8 +9,8 @@ import (
|
||||
const (
|
||||
// Current dirstibution to fetch migrations from
|
||||
CurrentIpfsDist = "/ipfs/Qme8pJhBidEUXRdpcWLGR2fkG5kdwVnaMh3kabjfP8zz7Y"
|
||||
// Distribution IPNS path. Default for fetchers.
|
||||
IpnsIpfsDist = "/ipns/dist.ipfs.io"
|
||||
// Latest distribution path. Default for fetchers.
|
||||
LatestIpfsDist = "/ipns/dist.ipfs.io"
|
||||
|
||||
// Distribution environ variable
|
||||
envIpfsDistPath = "IPFS_DIST_PATH"
|
||||
@ -77,7 +77,7 @@ func GetDistPathEnv(distPath string) string {
|
||||
return dist
|
||||
}
|
||||
if distPath == "" {
|
||||
return IpnsIpfsDist
|
||||
return LatestIpfsDist
|
||||
}
|
||||
return distPath
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@ var _ Fetcher = (*HttpFetcher)(nil)
|
||||
// Specifying 0 for fetchLimit sets the default, -1 means no limit.
|
||||
func NewHttpFetcher(distPath, gateway, userAgent string, fetchLimit int64) *HttpFetcher {
|
||||
f := &HttpFetcher{
|
||||
distPath: IpnsIpfsDist,
|
||||
distPath: LatestIpfsDist,
|
||||
gateway: defaultGatewayURL,
|
||||
limit: defaultFetchLimit,
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user