Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-path
Commits
2b1ce8e9
Commit
2b1ce8e9
authored
Mar 19, 2018
by
Łukasz Magiera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
misc: Remove some dead code
License: MIT Signed-off-by:
Łukasz Magiera
<
magik6k@gmail.com
>
parent
4dac8e9a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
path.go
path.go
+1
-1
path_test.go
path_test.go
+1
-1
No files found.
path.go
View file @
2b1ce8e9
...
...
@@ -62,7 +62,7 @@ func (p Path) String() string {
// IsJustAKey returns true if the path is of the form <key> or /ipfs/<key>.
func
(
p
Path
)
IsJustAKey
()
bool
{
parts
:=
p
.
Segments
()
return
(
len
(
parts
)
==
2
&&
parts
[
0
]
==
"ipfs"
)
return
len
(
parts
)
==
2
&&
parts
[
0
]
==
"ipfs"
}
// PopLastSegment returns a new Path without its final segment, and the final
...
...
path_test.go
View file @
2b1ce8e9
...
...
@@ -22,7 +22,7 @@ func TestPathParsing(t *testing.T) {
for
p
,
expected
:=
range
cases
{
_
,
err
:=
ParsePath
(
p
)
valid
:=
(
err
==
nil
)
valid
:=
err
==
nil
if
valid
!=
expected
{
t
.
Fatalf
(
"expected %s to have valid == %t"
,
p
,
expected
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment