mirror of
https://github.com/projectdiscovery/httpx.git
synced 2024-09-11 17:46:08 +03:00
Fixed golint issues
This commit is contained in:
parent
428849b291
commit
938d59e1bd
@ -5,6 +5,7 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
// TrimProtocol removes the HTTP scheme from an URI
|
||||
func TrimProtocol(targetURL string) string {
|
||||
URL := strings.TrimSpace(targetURL)
|
||||
if strings.HasPrefix(strings.ToLower(URL), "http://") || strings.HasPrefix(strings.ToLower(URL), "https://") {
|
||||
@ -32,6 +33,7 @@ func StringToSliceInt(s string) ([]int, error) {
|
||||
return r, nil
|
||||
}
|
||||
|
||||
// SplitByCharAndTrimSpace splits string by a character and remove spaces
|
||||
func SplitByCharAndTrimSpace(s, splitchar string) (result []string) {
|
||||
for _, token := range strings.Split(s, splitchar) {
|
||||
result = append(result, strings.TrimSpace(token))
|
||||
|
Loading…
Reference in New Issue
Block a user