Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
go-ipfs
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
ipfs
go-ipfs
Commits
31bb782e
Commit
31bb782e
authored
7 years ago
by
Steven Allen
Browse files
Options
Downloads
Patches
Plain Diff
fix code-climate issues
License: MIT Signed-off-by:
Steven Allen
<
steven@stebalien.com
>
parent
61b1d2f2
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
commands/legacy/legacy.go
+2
-0
2 additions, 0 deletions
commands/legacy/legacy.go
core/corehttp/commands.go
+4
-0
4 additions, 0 deletions
core/corehttp/commands.go
with
6 additions
and
0 deletions
commands/legacy/legacy.go
+
2
−
0
View file @
31bb782e
...
...
@@ -45,6 +45,8 @@ func (me *MarshalerEncoder) Encode(v interface{}) error {
return
err
}
// OldContext tries to cast the environment as a legacy command context,
// returning nil on failure.
func
OldContext
(
env
interface
{})
*
oldcmds
.
Context
{
ctx
,
ok
:=
env
.
(
*
oldcmds
.
Context
)
if
!
ok
{
...
...
This diff is collapsed.
Click to expand it.
core/corehttp/commands.go
+
4
−
0
View file @
31bb782e
...
...
@@ -134,10 +134,14 @@ func commandsOption(cctx oldcmds.Context, command *cmds.Command) ServeOption {
}
}
// CommandsOption constructs a ServerOption for hooking the commands into the
// HTTP server.
func
CommandsOption
(
cctx
oldcmds
.
Context
)
ServeOption
{
return
commandsOption
(
cctx
,
corecommands
.
Root
)
}
// CommandsOption constructs a ServerOption for hooking the read-only commands
// into the HTTP server.
func
CommandsROOption
(
cctx
oldcmds
.
Context
)
ServeOption
{
return
commandsOption
(
cctx
,
corecommands
.
RootRO
)
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment