Skip to content

Commit

Permalink
remove unused param
Browse files Browse the repository at this point in the history
  • Loading branch information
qmuntal committed Jan 2, 2021
1 parent e715209 commit cc8a627
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
3 changes: 1 addition & 2 deletions package_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ func Test_newPackage(t *testing.T) {
}{
{"base", &pkg{
parts: make(map[string]struct{}, 0),
},
},
}},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down
7 changes: 2 additions & 5 deletions part.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func NormalizePartName(name string) string {
if name == "" || name == "/" || name == "\\" || name == "." {
return ""
}
name, _ = split(name, '#', true)
name, _ = split(name, '#')
name = strings.NewReplacer("\\", "/", "//", "/").Replace(name)
name = unescape(name)
name = escape(name)
Expand Down Expand Up @@ -260,14 +260,11 @@ func unescape(s string) string {
return t.String()
}

func split(s string, sep byte, cutc bool) (string, string) {
func split(s string, sep byte) (string, string) {
i := strings.IndexByte(s, sep)
if i < 0 {
return s, ""
}
if cutc {
return s[:i], s[i+1:]
}
return s[:i], s[i:]
}

Expand Down

0 comments on commit cc8a627

Please sign in to comment.