func strings.HasSuffix
131 uses
strings (current package)
strings.go#L449: func HasSuffix(s, suffix string) bool {
strings.go#L912: if HasSuffix(s, suffix) {
archive/zip
reader.go#L708: if e.file == nil || strings.HasSuffix(e.file.Name, "/") {
writer.go#L331: if strings.HasSuffix(fh.Name, "/") {
cloud.google.com/go/cloudtasks/apiv2
doc.go#L105: if strings.HasSuffix(s, ".") {
cloud.google.com/go/container/apiv1
doc.go#L106: if strings.HasSuffix(s, ".") {
cloud.google.com/go/errorreporting/apiv1beta1
doc.go#L109: if strings.HasSuffix(s, ".") {
cloud.google.com/go/internal/version
version.go#L56: if strings.HasSuffix(s, ".") {
cloud.google.com/go/logging/apiv2
doc.go#L93: if strings.HasSuffix(s, ".") {
cloud.google.com/go/monitoring/apiv3
doc.go#L103: if strings.HasSuffix(s, ".") {
cloud.google.com/go/secretmanager/apiv1
doc.go#L106: if strings.HasSuffix(s, ".") {
cloud.google.com/go/storage
reader.go#L392: return strings.HasSuffix(err.Error(), "INTERNAL_ERROR") && strings.Contains(reflect.TypeOf(err).String(), "http2")
cloud.google.com/go/trace/apiv2
doc.go#L110: if strings.HasSuffix(s, ".") {
contrib.go.opencensus.io/exporter/stackdriver
stackdriver.go#L369: if o.MetricPrefix != "" && !strings.HasSuffix(o.MetricPrefix, "/") {
crypto/tls
handshake_messages.go#L420: if strings.HasSuffix(m.serverName, ".") {
tls.go#L298: if len(skippedBlockTypes) == 1 && strings.HasSuffix(skippedBlockTypes[0], "PRIVATE KEY") {
tls.go#L317: if keyDERBlock.Type == "PRIVATE KEY" || strings.HasSuffix(keyDERBlock.Type, " PRIVATE KEY") {
crypto/x509
verify.go#L445: if strings.Contains(host, ":") && !strings.HasSuffix(host, "]") {
verify.go#L453: if strings.HasPrefix(host, "[") && strings.HasSuffix(host, "]") ||
encoding/asn1
common.go#L184: if strings.HasSuffix(t.Name(), "SET") {
github.com/andybalholm/cascadia
selector.go#L326: return strings.HasSuffix(s, val)
github.com/aws/aws-sdk-go/internal/sdkuri
path.go#L16: hasTrailing := strings.HasSuffix(elems[len(elems)-1], "/")
github.com/aws/aws-sdk-go/private/protocol/rest
build.go#L241: hasSlash := strings.HasSuffix(u.Path, "/")
build.go#L247: if hasSlash && !strings.HasSuffix(u.Path, "/") {
github.com/evanw/esbuild/internal/bundler
bundler.go#L317: if strings.HasSuffix(args.options.PublicPath, "/") && strings.HasPrefix(relPath, "./") {
linker.go#L658: if js := c.options.OutputExtensionJS; strings.HasSuffix(baseNameOrEmpty, js) {
github.com/evanw/esbuild/internal/resolver
dataurl.go#L21: if strings.HasSuffix(parsed.mimeType, ";base64") {
resolver.go#L276: strings.HasSuffix(path, pattern.Suffix) {
resolver.go#L1131: if strings.HasSuffix(base, ".js") || strings.HasSuffix(base, ".jsx") {
resolver.go#L1316: if strings.HasPrefix(path, prefix) && strings.HasSuffix(path, suffix) && (len(prefix) > longestMatchPrefixLength ||
github.com/evanw/esbuild/pkg/api
api_impl.go#L683: if options.PublicPath != "" && !strings.HasSuffix(options.PublicPath, "/") && !strings.HasSuffix(options.PublicPath, "\\") {
serve_other.go#L211: if kind == fs.DirEntry && !strings.HasSuffix(req.URL.Path, "/") {
github.com/go-git/go-git/v5
common.go#L17: if strings.HasSuffix(s, "\n") {
github.com/go-git/go-git/v5/config
refspec.go#L113: strings.HasSuffix(name, suffix)
github.com/go-git/go-git/v5/plumbing/format/diff
unified_encoder.go#L65: if !strings.HasSuffix(message, "\n") {
unified_encoder.go#L369: if strings.HasSuffix(o.text, "\n") {
github.com/go-git/go-git/v5/plumbing/format/gitignore
pattern.go#L49: if !strings.HasSuffix(p, "\\ ") {
pattern.go#L53: if strings.HasSuffix(p, patternDirSep) {
github.com/go-git/go-git/v5/plumbing/transport/http
common.go#L151: if !strings.HasSuffix(r.URL.Path, infoRefsPath) {
github.com/go-git/go-git/v5/plumbing/transport/internal/common
common.go#L404: if strings.HasSuffix(s, localRepoNotFoundErr) {
github.com/go-git/go-git/v5/storage/filesystem/dotgit
dotgit.go#L232: if !strings.HasSuffix(n, packExt) || !strings.HasPrefix(n, packPrefix) {
github.com/golang/protobuf/proto
text_decode.go#L423: if strings.HasSuffix(v, "f") && v != "-inf" && v != "inf" {
text_decode.go#L433: if strings.HasSuffix(v, "f") && v != "-inf" && v != "inf" {
github.com/golang/protobuf/ptypes
any.go#L108: if !strings.HasSuffix(any.TypeUrl, name) {
github.com/google/go-cmp/cmp
report_reflect.go#L92: hasParens := strings.HasPrefix(s2.Prefix, "(") && strings.HasSuffix(s2.Suffix, ")")
report_reflect.go#L93: hasBraces := strings.HasPrefix(s2.Prefix, "{") && strings.HasSuffix(s2.Suffix, "}")
report_text.go#L413: if strings.HasSuffix(name, "ys") {
github.com/google/go-cmp/cmp/internal/function
func.go#L83: inParen := strings.HasSuffix(fullName, ")")
github.com/google/licensecheck
license.go#L232: if strings.HasPrefix(f, "Type(") && strings.HasSuffix(f, ")") {
github.com/google/safehtml
style.go#L88: if !strings.HasSuffix(string(style), ";") {
style.go#L191: if len(name) >= 3 && strings.HasPrefix(name, `"`) && strings.HasSuffix(name, `"`) {
github.com/jackc/pgservicefile
pgservicefile.go#L57: } else if strings.HasPrefix(line, "[") && strings.HasSuffix(line, "]") {
github.com/jmespath/go-jmespath
functions.go#L464: return strings.HasSuffix(search, suffix), nil
github.com/lib/pq
encode.go#L371: isBC := strings.HasSuffix(str, " BC")
github.com/prometheus/client_golang/prometheus
registry.go#L776: case strings.HasSuffix(newName, "_count"):
registry.go#L778: case strings.HasSuffix(newName, "_sum"):
registry.go#L780: case strings.HasSuffix(newName, "_bucket"):
registry.go#L787: if !strings.HasSuffix(newName, "_bucket") {
github.com/prometheus/procfs
net_unix.go#L200: if !strings.HasSuffix(str, ":") {
github.com/sergi/go-diff/diffmatchpatch
diff.go#L1098: if strings.HasSuffix(diffs[pointer].Text, diffs[pointer-1].Text) {
go/build
build.go#L175: if !strings.HasSuffix(root, sep) {
build.go#L569: return strings.Contains(sub, "/testdata/") || strings.HasSuffix(sub, "/testdata") || strings.HasPrefix(sub, "testdata/") || sub == "testdata"
build.go#L873: isTest := strings.HasSuffix(name, "_test.go")
build.go#L875: if isTest && strings.HasSuffix(pkg, "_test") {
build.go#L1211: if !ent.IsDir() && strings.HasSuffix(ent.Name(), ".go") {
build.go#L1409: if strings.HasSuffix(name, ".go") {
build.go#L1411: if strings.HasSuffix(name, "_test.go") {
go/doc
doc.go#L190: case strings.HasSuffix(name, ".go") && !strings.HasSuffix(name, "_test.go"):
doc.go#L192: case strings.HasSuffix(name, "_test.go"):
example.go#L155: if !strings.HasSuffix(file.Name.Name, "_test") {
go/parser
interface.go#L143: if d.IsDir() || !strings.HasSuffix(d.Name(), ".go") {
golang.org/x/mod/internal/lazyregexp
lazyre.go#L66: var inTest = len(os.Args) > 0 && strings.HasSuffix(strings.TrimSuffix(os.Args[0], ".exe"), ".test")
golang.org/x/mod/modfile
read.go#L485: if strings.HasSuffix(text, "\r\n") {
golang.org/x/mod/module
module.go#L516: if strings.HasSuffix(path, "-unstable") {
module.go#L547: if strings.HasPrefix(pathMajor, ".v") && strings.HasSuffix(pathMajor, "-unstable") {
module.go#L586: if strings.HasPrefix(pathMajor, ".v") && strings.HasSuffix(pathMajor, "-unstable") {
golang.org/x/mod/zip
zip.go#L422: isDir := strings.HasSuffix(name, "/")
zip.go#L642: if name == "" || strings.HasSuffix(name, "/") {
golang.org/x/net/http2
transport.go#L457: if strings.HasPrefix(host, "[") && strings.HasSuffix(host, "]") {
golang.org/x/net/proxy
per_host.go#L75: if strings.HasSuffix(host, zone) {
per_host.go#L140: if strings.HasSuffix(zone, ".") {
per_host.go#L151: if strings.HasSuffix(host, ".") {
golang.org/x/oauth2/google
sdk.go#L162: if strings.HasPrefix(line, "[") && strings.HasSuffix(line, "]") {
golang.org/x/pkgsite/internal/fetch
load.go#L278: if strings.HasSuffix(name, "_test.go") {
package.go#L130: if !strings.HasSuffix(f.Name, ".go") {
golang.org/x/pkgsite/internal/frontend
details.go#L45: if strings.HasSuffix(r.URL.Path, "/") {
directory.go#L66: if prefix != "internal" && (strings.HasSuffix(d.Suffix, "/internal") ||
doc.go#L46: if strings.HasSuffix(f.Name, "_test.go") {
versions.go#L240: return strings.HasSuffix(strings.TrimPrefix(v, semver.MajorMinor(v)), ".0")
golang.org/x/pkgsite/internal/godoc
godoc.go#L66: if removeNodes && !strings.HasSuffix(filename, "_test.go") && !strings.HasSuffix(f.Name.Name, "_test") {
golang.org/x/pkgsite/internal/godoc/codec
generate.go#L25: if !strings.HasSuffix(filename, ".go") {
golang.org/x/pkgsite/internal/godoc/dochtml/internal/render
linkify.go#L218: if len(src) >= 4 && strings.HasPrefix(src, "{\n") && strings.HasSuffix(src, "\n}") {
golang.org/x/pkgsite/internal/godoc/internal/doc
doc.go#L202: case strings.HasSuffix(name, ".go") && !strings.HasSuffix(name, "_test.go"):
doc.go#L204: case strings.HasSuffix(name, "_test.go"):
example.go#L155: if !strings.HasSuffix(file.Name.Name, "_test") {
golang.org/x/pkgsite/internal/postgres
excluded.go#L27: if !strings.HasSuffix(prefix, "/") {
golang.org/x/pkgsite/internal/source
source.go#L796: if !strings.HasSuffix(repoURL, ".git") {
golang.org/x/pkgsite/internal/static
static.go#L41: if strings.HasSuffix(v.Name(), ".ts") && !strings.HasSuffix(v.Name(), ".test.ts") {
golang.org/x/pkgsite/internal/symbol
compare.go#L50: if strings.HasSuffix(name, "embedded") {
golang.org/x/pkgsite/internal/version
version.go#L46: return strings.HasSuffix(v, "+incompatible")
golang.org/x/pkgsite/internal/worker
server.go#L348: if strings.HasSuffix(p, "/@latest") {
golang.org/x/xerrors
fmt.go#L39: wrap := strings.HasSuffix(format, ": %w")
fmt.go#L42: if !percentWElsewhere && (wrap || strings.HasSuffix(format, ": %s") || strings.HasSuffix(format, ": %v")) {
google.golang.org/api/internal/gensupport
version.go#L38: if strings.HasSuffix(s, ".") {
google.golang.org/api/internal/third_party/uritemplates
uritemplates.go#L175: if strings.HasSuffix(term, "*") {
google.golang.org/grpc
service_config.go#L187: if !strings.HasSuffix(*s, "s") {
google.golang.org/grpc/internal/transport
http_util.go#L211: if strings.HasSuffix(k, binHdrSuffix) {
http_util.go#L218: if strings.HasSuffix(k, binHdrSuffix) {
google.golang.org/protobuf/encoding/protojson
decode.go#L170: if strings.HasPrefix(name, "[") && strings.HasSuffix(name, "]") {
google.golang.org/protobuf/types/known/anypb
any.pb.go#L329: if !strings.HasSuffix(url, name) {
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#L997: if !strings.HasSuffix(sub, parent) {
fs.go#L592: if strings.HasSuffix(r.URL.Path, indexPage) {
h2_bundle.go#L6960: if strings.HasPrefix(host, "[") && strings.HasSuffix(host, "]") {
server.go#L2155: trailing := strings.HasSuffix(url, "/")
server.go#L2157: if trailing && !strings.HasSuffix(url, "/") {
net/http/httputil
reverseproxy.go#L103: aslash := strings.HasSuffix(a, "/")
reverseproxy.go#L123: aslash := strings.HasSuffix(apath, "/")
net/url
url.go#L533: if strings.HasSuffix(rest, "?") && strings.Count(rest, "?") == 1 {
url.go#L1162: if strings.HasPrefix(host, "[") && strings.HasSuffix(host, "]") {
testing
benchmark.go#L51: if strings.HasSuffix(s, "x") {
text/template/parse
parse.go#L195: if strings.HasSuffix(token.val, " action") {
vendor/golang.org/x/net/http/httpproxy
proxy.go#L364: if strings.HasSuffix(host, m.host) || (m.matchHost && host == m.host[1:]) {
 |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |