func strings.HasSuffix

59 uses

	strings (current package)
		strings.go#L525: func HasSuffix(s, suffix string) bool {

	crypto/tls
		handshake_messages.go#L498: 				if strings.HasSuffix(m.serverName, ".") {
		tls.go#L288: 		if len(skippedBlockTypes) == 1 && strings.HasSuffix(skippedBlockTypes[0], "PRIVATE KEY") {
		tls.go#L307: 		if keyDERBlock.Type == "PRIVATE KEY" || strings.HasSuffix(keyDERBlock.Type, " PRIVATE KEY") {

	crypto/x509
		constraints.go#L584: 		if strings.Contains(host, ":") && !strings.HasSuffix(host, "]") {
		constraints.go#L595: 		if _, err := netip.ParseAddr(host); err == nil || (strings.HasPrefix(host, "[") && strings.HasSuffix(host, "]")) {

	encoding/asn1
		common.go#L177: 		if strings.HasSuffix(t.Name(), "SET") {

	github.com/jackc/pgservicefile
		pgservicefile.go#L57: 		} else if strings.HasPrefix(line, "[") && strings.HasSuffix(line, "]") {

	github.com/jackc/pgx/v5/pgtype
		timestamp.go#L312: 		if strings.HasSuffix(sbuf, " BC") {
		timestamptz.go#L303: 		if strings.HasSuffix(sbuf, " BC") {

	go/build
		build.go#L182: 	if !strings.HasSuffix(root, sep) {
		build.go#L624: 			return strings.Contains(sub, "/testdata/") || strings.HasSuffix(sub, "/testdata") || strings.HasPrefix(sub, "testdata/") || sub == "testdata"
		build.go#L901: 		if err != nil && strings.HasSuffix(name, ".go") {
		build.go#L948: 		isTest := strings.HasSuffix(name, "_test.go")
		build.go#L950: 		if isTest && strings.HasSuffix(pkg, "_test") && p.Name != pkg {
		build.go#L1289: 		if !ent.IsDir() && strings.HasSuffix(ent.Name(), ".go") {
		build.go#L1482: 	if strings.HasSuffix(name, ".go") {
		build.go#L1484: 		if strings.HasSuffix(name, "_test.go") {

	go/doc
		doc.go#L287: 		case strings.HasSuffix(filename, "_test.go"):
		doc.go#L289: 		case strings.HasSuffix(filename, ".go"):
		example.go#L158: 	if !strings.HasSuffix(file.Name.Name, "_test") {

	go/doc/comment
		parse.go#L464: 				case strings.HasSuffix(lines[i-1], "{") || strings.HasSuffix(lines[i-1], `\`):
		print.go#L100: 		if strings.HasSuffix(baseURL, "/") {

	go/parser
		interface.go#L161: 		if d.IsDir() || !strings.HasSuffix(d.Name(), ".go") {

	golang.org/x/net/http2
		transport.go#L567: 	if strings.HasPrefix(host, "[") && strings.HasSuffix(host, "]") {

	golang.org/x/tools/go/packages
		golist.go#L1026: 		if strings.HasSuffix(f, ".go") {

	google.golang.org/grpc/internal/metadata
		metadata.go#L134: 	if strings.HasSuffix(key, "-bin") {

	google.golang.org/grpc/internal/serviceconfig
		duration.go#L66: 	if !strings.HasSuffix(s, "s") {

	google.golang.org/grpc/internal/transport
		http_util.go#L141: 	if strings.HasSuffix(k, binHdrSuffix) {
		http_util.go#L148: 	if strings.HasSuffix(k, binHdrSuffix) {

	google.golang.org/protobuf/encoding/protojson
		decode.go#L175: 		if strings.HasPrefix(name, "[") && strings.HasSuffix(name, "]") {

	google.golang.org/protobuf/types/known/anypb
		any.pb.go#L330: 	if !strings.HasSuffix(url, name) {

	internal/buildcfg
		cfg.go#L154: 	if strings.HasSuffix(v, softFloatOpt) {
		cfg.go#L159: 	if strings.HasSuffix(v, hardFloatOpt) {
		cfg.go#L216: 		if strings.HasSuffix(v, lseOpt) {
		cfg.go#L222: 		if strings.HasSuffix(v, cryptoOpt) {

	internal/goroot
		gc.go#L28: 			if strings.HasSuffix(dirent.Name(), ".go") {

	internal/lazyregexp
		lazyre.go#L66: var inTest = len(os.Args) > 0 && strings.HasSuffix(strings.TrimSuffix(os.Args[0], ".exe"), ".test")

	mime
		encodedword.go#L201: 	if len(word) < 8 || !strings.HasPrefix(word, "=?") || !strings.HasSuffix(word, "?=") || strings.Count(word, "?") != 4 {

	net/http
		client.go#L1041: 	if !strings.HasSuffix(sub, parent) {
		fs.go#L685: 	if strings.HasSuffix(r.URL.Path, indexPage) {
		h2_bundle.go#L7873: 	if strings.HasPrefix(host, "[") && strings.HasSuffix(host, "]") {
		server.go#L2393: 			trailing := strings.HasSuffix(url, "/")
		server.go#L2395: 			if trailing && !strings.HasSuffix(url, "/") {
		server.go#L2731: 	if !exactMatch(n, path) && u != nil && !strings.HasSuffix(path, "/") && path != "" {
		server.go#L2806: 	if !strings.HasSuffix(path, "/") {

	net/http/httptest
		server.go#L141: 			if addr == "example.com:80" || strings.HasSuffix(addr, ".example.com:80") {
		server.go#L204: 		if addr == "example.com:443" || strings.HasSuffix(addr, ".example.com:443") {

	net/http/httputil
		reverseproxy.go#L277: 	aslash := strings.HasSuffix(a, "/")
		reverseproxy.go#L297: 	aslash := strings.HasSuffix(apath, "/")

	net/url
		url.go#L456: 	if strings.HasSuffix(rest, "?") && strings.Count(rest, "?") == 1 {
		url.go#L1207: 	if strings.HasPrefix(host, "[") && strings.HasSuffix(host, "]") {
		url.go#L1256: 	if strings.HasSuffix(elem[len(elem)-1], "/") && !strings.HasSuffix(p, "/") {

	testing
		benchmark.go#L52: 	if strings.HasSuffix(s, "x") {
		match.go#L268: 		if !strings.HasSuffix(prefix, "/") {

	text/template/parse
		parse.go#L208: 			if strings.HasSuffix(token.val, " action") {

	vendor/golang.org/x/net/http/httpproxy
		proxy.go#L369: 	if strings.HasSuffix(host, m.host) || (m.matchHost && host == m.host[1:]) {