Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

validation.gno

0.20 Kb · 11 lines
 1package user
 2
 3import "unicode/utf8"
 4
 5const renderURLMaxRunes = 1024
 6
 7func assertRenderURLLen(value string) {
 8	if utf8.RuneCountInString(value) > renderURLMaxRunes {
 9		panic("url exceeds max runes")
10	}
11}