Commit 652ac620 authored by Steven Allen's avatar Steven Allen Committed by Jeromy

golint: documentation fixes

License: MIT
Signed-off-by: default avatarSteven Allen <steven@stebalien.com>
parent 9080a588
......@@ -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 {
......
......@@ -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 {
......
......@@ -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{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment