func interestingNames() (names []string) {
	const maxLegalLength = 1024

	names = []string{
		// Characters specifically mentioned by RFC 3986, i.e. that might be
		// important in URL encoding/decoding.
		"foo : bar",
		"foo / bar",
		"foo ? bar",
		"foo # bar",
		"foo [ bar",
		"foo ] bar",
		"foo @ bar",
		"foo ! bar",
		"foo $ bar",
		"foo & bar",
		"foo ' bar",
		"foo ( bar",
		"foo ) bar",
		"foo * bar",
		"foo + bar",
		"foo , bar",
		"foo ; bar",
		"foo = bar",
		"foo - bar",
		"foo . bar",
		"foo _ bar",
		"foo ~ bar",

		// Other tricky URL cases.
		"foo () bar",
		"foo [] bar",
		"foo // bar",
		"foo %?/ bar",
		"foo http://google.com/search?q=foo&bar=baz#qux bar",

		"foo ?bar",
		"foo? bar",
		"foo/ bar",
		"foo /bar",

		// Non-Roman scripts
		"타코",
		"世界",

		// Longest legal name
		strings.Repeat("a", maxLegalLength),

		// Null byte.
		"foo \u0000 bar",

		// Non-control characters that are discouraged, but not forbidden,
		// according to the documentation.
		"foo # bar",
		"foo []*? bar",

		// Angstrom symbol singleton and normalized forms.
		// Cf. http://unicode.org/reports/tr15/
		"foo \u212b bar",
		"foo \u0041\u030a bar",
		"foo \u00c5 bar",

		// Hangul separating jamo
		// Cf. http://www.unicode.org/versions/Unicode7.0.0/ch18.pdf (Table 18-10)
		"foo \u3131\u314f bar",
		"foo \u1100\u1161 bar",
		"foo \uac00 bar",

		// Unicode specials
		// Cf. http://en.wikipedia.org/wiki/Specials_%28Unicode_block%29
		"foo \ufff9 bar",
		"foo \ufffa bar",
		"foo \ufffb bar",
		"foo \ufffc bar",
		"foo \ufffd bar",
	}

	// All codepoints in Unicode general categories C* (control and special) and
	// Z* (space), except for:
	//
	//  *  Cn (non-character and reserved), which is not included in unicode.C.
	//  *  Co (private usage), which is large.
	//  *  Cs (surrages), which is large.
	//  *  U+000A and U+000D, which are forbidden by the docs.
	//
	for r := rune(0); r <= unicode.MaxRune; r++ {
		if !unicode.In(r, unicode.C) && !unicode.In(r, unicode.Z) {
			continue
		}

		if unicode.In(r, unicode.Co) {
			continue
		}

		if unicode.In(r, unicode.Cs) {
			continue
		}

		if r == 0x0a || r == 0x0d {
			continue
		}

		names = append(names, fmt.Sprintf("foo %s bar", string(r)))
	}

	return
}
// Return a list of object names that might be problematic for GCS or the Go
// client but are nevertheless documented to be legal.
//
// Useful links:
//
//     https://cloud.google.com/storage/docs/bucket-naming
//     http://www.unicode.org/Public/7.0.0/ucd/UnicodeData.txt
//     http://www.unicode.org/versions/Unicode7.0.0/ch02.pdf (Table 2-3)
//
Return a list of object names that might be problematic for GCS or the Go
client but are nevertheless documented to be legal.

Useful links.


// Return a list of object names that might be problematic for GCS or the Go // client but are nevertheless documented to be legal . // // Useful links : // // https : // cloud . google . com / storage / docs / bucket - naming // http : // www . unicode . org / Public / 7 . 0 . 0 / ucd / UnicodeData . txt // http : // www . unicode . org / versions / Unicode7 . 0 . 0 / ch02 . pdf ( Table 2 - 3 ) //
func interestingNames() (names []string) {
	const maxLegalLength = 1024
	names = []string{
		"foo : bar",
		"foo / bar",
		"foo ? bar",
		"foo # bar",
		"foo [ bar",
		"foo ] bar",
		"foo @ bar",
		"foo ! bar",
		"foo $ bar",
		"foo & bar",
		"foo ' bar",
		"foo ( bar",
		"foo ) bar",
		"foo * bar",
		"foo + bar",
		"foo , bar",
		"foo ; bar",
		"foo = bar",
		"foo - bar",
		"foo . bar",
		"foo _ bar",
		"foo ~ bar",
		"foo () bar",
		"foo [] bar",
		"foo  bar",
		"foo %?/ bar",
		"foo http:google.com/search?q=foo&bar=baz#qux bar",
		"foo ?bar",
		"foo? bar",
		"foo/ bar",
		"foo /bar",
		"타코",
		"世界",
		strings.Repeat("a", maxLegalLength),
		"foo \u0000 bar",
		"foo # bar",
		"foo []*? bar",
		"foo \u212b bar",
		"foo \u0041\u030a bar",
		"foo \u00c5 bar",
		"foo \u3131\u314f bar",
		"foo \u1100\u1161 bar",
		"foo \uac00 bar",
		"foo \ufff9 bar",
		"foo \ufffa bar",
		"foo \ufffb bar",
		"foo \ufffc bar",
		"foo \ufffd bar",
	}
	  *  Cn (non-character and reserved), which is not included in unicode.C.
	  *  Co (private usage), which is large.
	  *  Cs (surrages), which is large.
	  *  U+000A and U+000D, which are forbidden by the docs.
	for r := rune(0); r <= unicode.MaxRune; r++ {
		if !unicode.In(r, unicode.C) && !unicode.In(r, unicode.Z) {
			continue
		}
		if unicode.In(r, unicode.Co) {
			continue
		}
		if unicode.In(r, unicode.Cs) {
			continue
		}
		if r == 0x0a || r == 0x0d {
			continue
		}
		names = append(names, fmt.Sprintf("foo %s bar", string(r)))
	}
	return
}
func interestingNames ( ) ( names [ ] string ) { const maxLegalLength = 1024 names = [ ] string { " " , " " , " " , " " , " " , " " , " " , " " , " " , " " , " " , " " , " " , " " , " " , " " , " " , " " , " " , " " , " " , " " , " " , " " , " " , " " , " " , " " , " " , " " , " " , " " strings . Repeat ( " " , maxLegalLength ) , " \u0000 " , " " , " " , " \u212b " , " \u0041 \u030a " , " \u00c5 " , " \u3131 \u314f " , " \u1100 \u1161 " , " \uac00 " , " \ufff9 " , " \ufffa " , " \ufffb " , " \ufffc " , " \ufffd " , } for r := rune ( 0 ) ; r <= unicode . MaxRune ; r ++ { if ! unicode . In ( r , unicode . C ) && ! unicode . In ( r , unicode . Z ) { continue } if unicode . In ( r , unicode . Co ) { continue } if unicode . In ( r , unicode . Cs ) { continue } if r == 0x0a || r == 0x0d { continue } names = append ( names , fmt . Sprintf ( " " , string ( r ) ) ) } return }
Return a list of object names that might be problematic for GCS or the Go
client but are nevertheless documented to be legal.
Return a list of object names that might be problematic for GCS or the Go client but are nevertheless documented to be legal .
// Characters specifically mentioned by RFC 3986, i.e. that might be // important in URL encoding/decoding. // Other tricky URL cases. // Non-Roman scripts // Longest legal name // Null byte. // Non-control characters that are discouraged, but not forbidden, // according to the documentation. // Angstrom symbol singleton and normalized forms. // Cf. http://unicode.org/reports/tr15/ // Hangul separating jamo // Cf. http://www.unicode.org/versions/Unicode7.0.0/ch18.pdf (Table 18-10) // Unicode specials // Cf. http://en.wikipedia.org/wiki/Specials_%28Unicode_block%29 // All codepoints in Unicode general categories C* (control and special) and // Z* (space), except for: // //  *  Cn (non-character and reserved), which is not included in unicode.C. //  *  Co (private usage), which is large. //  *  Cs (surrages), which is large. //  *  U+000A and U+000D, which are forbidden by the docs. //