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:
@ -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{
|
||||
|
Reference in New Issue
Block a user