···197197}
198198199199// keyHasAllValidChars reports whether s matches
200200-// the regexp /^[a-zA-Z0-9_:.-]+$/ without using regexp,
200200+// the regexp /^[a-zA-Z0-9_:.~-]+$/ without using regexp,
201201// which is slower.
202202func keyHasAllValidChars(s string) bool {
203203 if len(s) == 0 {
···211211 continue
212212 }
213213 switch b {
214214- case '_', ':', '.', '-', '~':
214214+ case '_', ':', '.', '~', '-':
215215 continue
216216 default:
217217 return false