@@ -73,7 +73,7 @@ const (
73
73
enableMultiplexKwd = "enable-mplex-experiment"
74
74
agentVersionSuffix = "agent-version-suffix"
75
75
// apiAddrKwd = "address-api"
76
- // swarmAddrKwd = "address-swarm"
76
+ // swarmAddrKwd = "address-swarm".
77
77
)
78
78
79
79
var daemonCmd = & cmds.Command {
@@ -389,7 +389,7 @@ func daemonFunc(req *cmds.Request, re cmds.ResponseEmitter, env cmds.Environment
389
389
"pubsub" : pubsub ,
390
390
"ipnsps" : ipnsps ,
391
391
},
392
- //TODO(Kubuxu): refactor Online vs Offline by adding Permanent vs Ephemeral
392
+ // TODO(Kubuxu): refactor Online vs Offline by adding Permanent vs Ephemeral
393
393
}
394
394
395
395
routingOption , _ := req .Options [routingOptionKwd ].(string )
@@ -552,7 +552,7 @@ take effect.
552
552
}
553
553
554
554
// Add ipfs version info to prometheus metrics
555
- var ipfsInfoMetric = promauto .NewGaugeVec (prometheus.GaugeOpts {
555
+ ipfsInfoMetric : = promauto .NewGaugeVec (prometheus.GaugeOpts {
556
556
Name : "ipfs_info" ,
557
557
Help : "IPFS version information." ,
558
558
}, []string {"version" , "commit" })
@@ -607,7 +607,6 @@ take effect.
607
607
log .Error ("failed to bootstrap (no peers found): consider updating Bootstrap or Peering section of your config" )
608
608
}
609
609
})
610
-
611
610
}
612
611
613
612
// Hard deprecation notice if someone still uses IPFS_REUSEPORT
@@ -627,7 +626,7 @@ take effect.
627
626
return errs
628
627
}
629
628
630
- // serveHTTPApi collects options, creates listener, prints status message and starts serving requests
629
+ // serveHTTPApi collects options, creates listener, prints status message and starts serving requests.
631
630
func serveHTTPApi (req * cmds.Request , cctx * oldcmds.Context ) (<- chan error , error ) {
632
631
cfg , err := cctx .GetConfig ()
633
632
if err != nil {
@@ -690,7 +689,7 @@ func serveHTTPApi(req *cmds.Request, cctx *oldcmds.Context) (<-chan error, error
690
689
gatewayOpt = corehttp .GatewayOption ("/ipfs" , "/ipns" )
691
690
}
692
691
693
- var opts = []corehttp.ServeOption {
692
+ opts : = []corehttp.ServeOption {
694
693
corehttp .MetricsCollectionOption ("api" ),
695
694
corehttp .MetricsOpenCensusCollectionOption (),
696
695
corehttp .MetricsOpenCensusDefaultPrometheusRegistry (),
@@ -752,7 +751,7 @@ func rewriteMaddrToUseLocalhostIfItsAny(maddr ma.Multiaddr) ma.Multiaddr {
752
751
}
753
752
}
754
753
755
- // printSwarmAddrs prints the addresses of the host
754
+ // printSwarmAddrs prints the addresses of the host.
756
755
func printSwarmAddrs (node * core.IpfsNode ) {
757
756
if ! node .IsOnline {
758
757
fmt .Println ("Swarm not listening, running in offline mode." )
@@ -781,10 +780,9 @@ func printSwarmAddrs(node *core.IpfsNode) {
781
780
for _ , addr := range addrs {
782
781
fmt .Printf ("Swarm announcing %s\n " , addr )
783
782
}
784
-
785
783
}
786
784
787
- // serveHTTPGateway collects options, creates listener, prints status message and starts serving requests
785
+ // serveHTTPGateway collects options, creates listener, prints status message and starts serving requests.
788
786
func serveHTTPGateway (req * cmds.Request , cctx * oldcmds.Context ) (<- chan error , error ) {
789
787
cfg , err := cctx .GetConfig ()
790
788
if err != nil {
@@ -837,7 +835,7 @@ func serveHTTPGateway(req *cmds.Request, cctx *oldcmds.Context) (<-chan error, e
837
835
cmdctx := * cctx
838
836
cmdctx .Gateway = true
839
837
840
- var opts = []corehttp.ServeOption {
838
+ opts : = []corehttp.ServeOption {
841
839
corehttp .MetricsCollectionOption ("gateway" ),
842
840
corehttp .HostnameOption (),
843
841
corehttp .GatewayOption ("/ipfs" , "/ipns" ),
@@ -891,7 +889,7 @@ func serveHTTPGateway(req *cmds.Request, cctx *oldcmds.Context) (<-chan error, e
891
889
return errc , nil
892
890
}
893
891
894
- // collects options and opens the fuse mountpoint
892
+ // collects options and opens the fuse mountpoint.
895
893
func mountFuse (req * cmds.Request , cctx * oldcmds.Context ) error {
896
894
cfg , err := cctx .GetConfig ()
897
895
if err != nil {
0 commit comments