func strings.HasSuffix
60 uses
strings (current package)
strings.go#L521: func HasSuffix(s, suffix string) bool {
crypto/tls
handshake_messages.go#L498: if strings.HasSuffix(m.serverName, ".") {
tls.go#L277: if len(skippedBlockTypes) == 1 && strings.HasSuffix(skippedBlockTypes[0], "PRIVATE KEY") {
tls.go#L296: if keyDERBlock.Type == "PRIVATE KEY" || strings.HasSuffix(keyDERBlock.Type, " PRIVATE KEY") {
crypto/x509
verify.go#L461: if strings.Contains(host, ":") && !strings.HasSuffix(host, "]") {
verify.go#L472: 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/google/go-cmp/cmp
report_reflect.go#L99: hasParens := strings.HasPrefix(s2.Prefix, "(") && strings.HasSuffix(s2.Suffix, ")")
report_reflect.go#L100: hasBraces := strings.HasPrefix(s2.Prefix, "{") && strings.HasSuffix(s2.Suffix, "}")
report_text.go#L414: if strings.HasSuffix(name, "ys") {
github.com/google/go-cmp/cmp/internal/function
func.go#L90: inParen := strings.HasSuffix(fullName, ")")
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#L1301: if !ent.IsDir() && strings.HasSuffix(ent.Name(), ".go") {
build.go#L1494: if strings.HasSuffix(name, ".go") {
build.go#L1496: if strings.HasSuffix(name, "_test.go") {
go/doc
doc.go#L238: case strings.HasSuffix(name, ".go") && !strings.HasSuffix(name, "_test.go"):
doc.go#L240: case strings.HasSuffix(name, "_test.go"):
example.go#L156: 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#L156: if d.IsDir() || !strings.HasSuffix(d.Name(), ".go") {
golang.org/x/net/http2
transport.go#L613: 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) {
gotest.tools/v3/internal/format
diff.go#L159: if !strings.HasSuffix(lines[len(lines)-1], "\n") {
internal/buildcfg
cfg.go#L143: if strings.HasSuffix(v, softFloatOpt) {
cfg.go#L148: if strings.HasSuffix(v, hardFloatOpt) {
cfg.go#L205: if strings.HasSuffix(v, lseOpt) {
cfg.go#L211: 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#L1027: if !strings.HasSuffix(sub, parent) {
fs.go#L680: if strings.HasSuffix(r.URL.Path, indexPage) {
h2_bundle.go#L8035: if strings.HasPrefix(host, "[") && strings.HasSuffix(host, "]") {
server.go#L2399: trailing := strings.HasSuffix(url, "/")
server.go#L2401: if trailing && !strings.HasSuffix(url, "/") {
server.go#L2729: if !exactMatch(n, path) && u != nil && !strings.HasSuffix(path, "/") {
server.go#L2800: if !strings.HasSuffix(path, "/") {
net/http/httputil
reverseproxy.go#L210: aslash := strings.HasSuffix(a, "/")
reverseproxy.go#L230: aslash := strings.HasSuffix(apath, "/")
net/url
url.go#L533: if strings.HasSuffix(rest, "?") && strings.Count(rest, "?") == 1 {
url.go#L1207: if strings.HasPrefix(host, "[") && strings.HasSuffix(host, "]") {
url.go#L1250: 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#L196: 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:]) {