1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-08-06 11:31:54 +08:00

golint: documentation fixes

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
This commit is contained in:
Steven Allen
2018-01-11 14:02:13 -08:00
committed by Jeromy
parent 9080a588d8
commit 652ac620b1
3 changed files with 4 additions and 1 deletions

View File

@ -65,7 +65,7 @@ func (c *Context) NodeWithoutConstructing() *core.IpfsNode {
return c.node
}
// RootContext returns the node's context.
// Context returns the node's context.
func (c *Context) Context() context.Context {
n, err := c.GetNode()
if err != nil {

View File

@ -8,6 +8,7 @@ import (
"github.com/ipfs/go-ipfs/repo/config"
)
// GetNode extracts the node from the environment.
func GetNode(env interface{}) (*core.IpfsNode, error) {
ctx, ok := env.(*commands.Context)
if !ok {
@ -17,6 +18,7 @@ func GetNode(env interface{}) (*core.IpfsNode, error) {
return ctx.GetNode()
}
// GetConfig extracts the config from the environment.
func GetConfig(env interface{}) (*config.Config, error) {
ctx, ok := env.(*commands.Context)
if !ok {

View File

@ -37,6 +37,7 @@ or
ipfs daemon --api-http-header 'Access-Control-Allow-Origin: *'
`
// APIPath is the path at which the API is mounted.
const APIPath = "/api/v0"
var defaultLocalhostOrigins = []string{