Skip to content
Myr

Fixes pathFor()

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Manu Mtz-Almeida · committed by Manu Mtz-Almeida · parent d0fb4a6 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:gin.go+1 added-1 removed
142 unmodified lines
143144func (group *RouterGroup) pathFor(p string) string {145 joined := path.Join(group.prefix, p)146 // Append a '/' if the last component had one, but only if it's not there already147 if len(p) > 0 && p[len(p)-1] == '/' && joined[len(p)-1] != '/' {147 if len(p) > 0 && p[len(p)-1] == '/' && joined[len(joined)-1] != '/' {148 return joined + "/"149 }150 return joined151}
81 unmodified lines