Disable preview option in prompts if URL size is too long
This commit is contained in:
parent
d22e72a373
commit
fb39c38c85
6 changed files with 100 additions and 42 deletions
|
|
@ -78,3 +78,8 @@ func DisplayURL(urlStr string) string {
|
|||
}
|
||||
return u.Hostname() + u.Path
|
||||
}
|
||||
|
||||
// Maximum length of a URL: 8192 bytes
|
||||
func ValidURL(urlStr string) bool {
|
||||
return len(urlStr) < 8192
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue