Skip to content

Commit

Permalink
Remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyak committed Apr 4, 2022
1 parent bc74676 commit fa515e7
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions common/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,6 @@ func IsValidName(name string) bool {
usernameRegex.MatchString(name)
}

func Substr(input string, start int, length int) string {
asRunes := []rune(input)

if start >= len(asRunes) {
return ""
}

if start+length > len(asRunes) {
length = len(asRunes) - start
}

return string(asRunes[start : start+length])
}

// Return the value of "Forwarded" or "X-Forwarded-For",
// if "Forwarded" & "X-Forwarded-For" are present then "Forwarded" value is returned.
// Return "" if "Forwarded" and "X-Forwarded-For" are absent.
Expand Down

0 comments on commit fa515e7

Please sign in to comment.