@cryptotaxi247 / kubo / commits / 652ac620b

golint: documentation fixes

License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>

Steven Allen committed Jan 11, 2018 at 14:02 UTC 652ac620b149aae0d7669f96b76a0a84413c1de8
3 files changed +4 -1
commands/request.go
+1 -1
@@ -65,7 +65,7 @@ func (c *Context) NodeWithoutConstructing() *core.IpfsNode {
65 return c.node
66 }
67
68 -// RootContext returns the node's context.
68 +// Context returns the node's context.
69 func (c *Context) Context() context.Context {
70 n, err := c.GetNode()
71 if err != nil {
core/commands/env.go
+2
@@ -8,6 +8,7 @@ import (
8 "github.com/ipfs/go-ipfs/repo/config"
9 )
10
11 +// GetNode extracts the node from the environment.
12 func GetNode(env interface{}) (*core.IpfsNode, error) {
13 ctx, ok := env.(*commands.Context)
14 if !ok {
@@ -17,6 +18,7 @@ func GetNode(env interface{}) (*core.IpfsNode, error) {
18 return ctx.GetNode()
19 }
20
21 +// GetConfig extracts the config from the environment.
22 func GetConfig(env interface{}) (*config.Config, error) {
23 ctx, ok := env.(*commands.Context)
24 if !ok {
core/corehttp/commands.go
+1
@@ -37,6 +37,7 @@ or
37 ipfs daemon --api-http-header 'Access-Control-Allow-Origin: *'
38 `
39
40 +// APIPath is the path at which the API is mounted.
41 const APIPath = "/api/v0"
42
43 var defaultLocalhostOrigins = []string{