func strings.Contains
121 uses
strings (current package)
strings.go#L61: func Contains(s, substr string) bool {
cloud.google.com/go/storage
go110.go#L38: if strings.Contains(e.Error(), s) {
reader.go#L216: if !strings.HasPrefix(cr, "bytes ") || !strings.Contains(cr, "/") {
reader.go#L392: return strings.HasSuffix(err.Error(), "INTERNAL_ERROR") && strings.Contains(reflect.TypeOf(err).String(), "http2")
storage.go#L621: if strings.HasPrefix(strings.ToLower(h), "x-goog-content-sha256") && strings.Contains(h, ":") {
contrib.go.opencensus.io/exporter/stackdriver
metrics_proto.go#L429: if strings.Contains(name, domain) {
contrib.go.opencensus.io/exporter/stackdriver/monitoredresource/gcp
gcp_metadata_config.go#L113: if !strings.Contains(err.Error(), "not defined") {
crypto/x509
root_darwin.go#L17: var debugDarwinRoots = strings.Contains(os.Getenv("GODEBUG"), "x509roots=1")
verify.go#L22: var ignoreCN = !strings.Contains(os.Getenv("GODEBUG"), "x509ignoreCN=0")
verify.go#L418: if strings.Contains(constraint, "@") {
verify.go#L445: if strings.Contains(host, ":") && !strings.HasSuffix(host, "]") {
x509.go#L1235: if strings.Contains(constraint, "@") {
encoding/pem
pem.go#L267: if strings.Contains(k, ":") {
encoding/xml
marshal.go#L345: if prefix == "" || !isName([]byte(prefix)) || strings.Contains(prefix, ":") {
marshal.go#L903: dashDash = strings.Contains(s, "--")
github.com/andybalholm/cascadia
selector.go#L338: return strings.Contains(s, val)
selector.go#L432: return strings.Contains(text, s.value)
github.com/aws/aws-sdk-go/aws/csm
enable.go#L34: if strings.Contains(host, ":") {
github.com/aws/aws-sdk-go/aws/request
connection_reset_error.go#L8: if strings.Contains(err.Error(), "read: connection reset") {
connection_reset_error.go#L12: if strings.Contains(err.Error(), "use of closed network connection") ||
connection_reset_error.go#L13: strings.Contains(err.Error(), "connection reset") ||
connection_reset_error.go#L14: strings.Contains(err.Error(), "broken pipe") {
request.go#L679: if strings.Contains(hostport, "]") {
retryer.go#L192: if strings.Contains(err.Error(), "connection refused") {
github.com/go-git/go-git/v5/config
refspec.go#L93: return strings.Contains(string(s), refSpecWildcard)
github.com/go-git/go-git/v5/plumbing/format/config
encoder.go#L62: if strings.Contains(o.Value, "\\") {
github.com/go-git/go-git/v5/plumbing/format/gitignore
pattern.go#L58: if strings.Contains(p, patternDirSep) {
pattern.go#L120: if strings.Contains(pattern, zeroToManyDirs) {
github.com/google/pprof/profile
legacy_java_profile.go#L283: } else if strings.Contains(jloc[2], "generated stub/JIT") {
legacy_profile.go#L934: if strings.Contains(line, "same as previous thread") {
legacy_profile.go#L1056: if perm != "" && !strings.Contains(perm, "x") {
legacy_profile.go#L1083: if strings.Contains(line, s) {
github.com/google/safehtml
style.go#L91: if !strings.Contains(string(style), ":") {
github.com/googleapis/gax-go/v2
invoke.go#L83: if strings.Contains(err.Error(), "x509: certificate signed by unknown authority") {
github.com/jackc/pgconn
config.go#L437: return net.ParseIP(strings.Trim(host, "[]")) != nil || !strings.Contains(host, ":")
github.com/lib/pq
conn.go#L1533: if strings.Contains(literal, `\`) {
github.com/microcosm-cc/bluemonday
sanitize.go#L399: if strings.Contains(htmlAttr.Val, "nofollow") {
sanitize.go#L468: if strings.Contains(htmlAttr.Val, "noopener") {
sanitize.go#L515: if (strings.Contains(rawurl, " ") ||
sanitize.go#L516: strings.Contains(rawurl, "\t") ||
sanitize.go#L517: strings.Contains(rawurl, "\n")) &&
github.com/prometheus/procfs
mdstat.go#L101: if strings.Contains(lines[i+2], "bitmap") { // skip bitmap line
mdstat.go#L108: recovering := strings.Contains(lines[syncLineIdx], "recovery")
mdstat.go#L109: resyncing := strings.Contains(lines[syncLineIdx], "resync")
mdstat.go#L120: if strings.Contains(lines[syncLineIdx], "PENDING") ||
mdstat.go#L121: strings.Contains(lines[syncLineIdx], "DELAYED") {
mdstat.go#L154: if strings.Contains(deviceLine, "raid0") || strings.Contains(deviceLine, "linear") {
mdstat.go#L160: if strings.Contains(deviceLine, "inactive") {
net_unix.go#L123: hasInode := strings.Contains(header, "Inode")
go/build
build.go#L569: return strings.Contains(sub, "/testdata/") || strings.HasSuffix(sub, "/testdata") || strings.HasPrefix(sub, "testdata/") || sub == "testdata"
build.go#L635: if !ok || !strings.HasPrefix(sub, "src/") || strings.Contains(sub, "/testdata/") {
go/doc
comment.go#L111: if strings.Contains(match, "://") {
go/format
internal.go#L34: if err == nil || !fragmentOk || !strings.Contains(err.Error(), "expected 'package'") {
internal.go#L56: if !strings.Contains(err.Error(), "expected declaration") {
go/printer
printer.go#L123: if t := c.Text; len(t) >= 2 && (t[1] == '/' || strings.Contains(t, "\n")) {
golang.org/x/crypto/ssh
keys.go#L1102: return strings.Contains(block.Headers["Proc-Type"], "ENCRYPTED")
golang.org/x/crypto/ssh/knownhosts
knownhosts.go#L35: if strings.Contains(h, ":") {
knownhosts.go#L448: } else if strings.Contains(host, ":") && !strings.HasPrefix(host, "[") {
golang.org/x/mod/modfile
rule.go#L349: if filepath.Separator == '/' && strings.Contains(ns, `\`) {
rule.go#L482: return s == "" || strings.Contains(s, "//") || strings.Contains(s, "/*")
golang.org/x/mod/module
module.go#L294: if !strings.Contains(path[:i], ".") {
module.go#L351: if strings.Contains(path, "//") {
module.go#L650: if err := checkElem(v, true); err != nil || strings.Contains(v, "!") {
golang.org/x/mod/zip
zip.go#L596: return strings.Contains(name[i:], "/")
golang.org/x/net/html
render.go#L240: if strings.Contains(s, `"`) {
golang.org/x/net/http2
http2.go#L43: if strings.Contains(e, "http2debug=1") {
http2.go#L46: if strings.Contains(e, "http2debug=2") {
server.go#L674: if strings.Contains(str, "use of closed network connection") {
server.go#L2930: if !strings.Contains(v, ",") {
golang.org/x/net/proxy
per_host.go#L104: if strings.Contains(host, "/") {
golang.org/x/oauth2
oauth2.go#L170: if strings.Contains(c.Endpoint.AuthURL, "?") {
golang.org/x/pkgsite/devtools/cmd/css
main.go#L145: if strings.Contains(property, k) {
golang.org/x/pkgsite/internal/database
database.go#L211: if strings.Contains(err.Error(), serializationFailureCode) {
logging.go#L108: strings.Contains(entry.Error, "pq: canceling statement due to user request") {
golang.org/x/pkgsite/internal/fetch
package.go#L267: strings.Contains(importPath, "/vendor/")
golang.org/x/pkgsite/internal/frontend
directory.go#L67: strings.Contains(d.Suffix, "/internal/")) {
fetch.go#L284: if fr.err != nil && strings.Contains(fr.err.Error(), fetch.ErrModuleContainsNoPackages.Error()) {
fetch.go#L379: if ctx.Err() != nil || (fr.err != nil && strings.Contains(fr.err.Error(), "pq: canceling statement due to user request")) {
search.go#L299: if !strings.Contains(requestedPath, "/") {
server.go#L192: if strings.Contains(userAgent, c) {
symbol.go#L245: if strings.Contains(parent.Synopsis, "interface") {
golang.org/x/pkgsite/internal/godoc/dochtml/internal/render
idents.go#L257: allowPartial := isExported(word[:j]) || strings.Contains(word[:j], ".")
linkify.go#L310: case strings.Contains(word, "://"):
synopsis.go#L162: if strings.Contains(s, "\n") {
golang.org/x/pkgsite/internal/licenses
licenses.go#L463: return strings.Contains(name[vendorOffset:], "/")
golang.org/x/pkgsite/internal/middleware
requestlog.go#L106: if strings.Contains(strings.ToLower(userAgent), "bot/") || strings.Contains(userAgent, "robot") {
golang.org/x/pkgsite/internal/proxy
client.go#L292: case strings.Contains(d, "fetch timed out"):
golang.org/x/pkgsite/internal/source
meta-tags.go#L44: if !strings.Contains(uri, "/") {
golang.org/x/pkgsite/internal/stdlib
stdlib.go#L428: if strings.HasPrefix(e.Name, "README") && !strings.Contains(dirpath, "/") {
stdlib.go#L505: return !strings.Contains(path, ".")
google.golang.org/api/idtoken
cache.go#L102: if strings.Contains(v, "max-age") {
google.golang.org/api/internal/third_party/uritemplates
uritemplates.go#L82: if strings.Contains(s, "}") {
google.golang.org/api/transport/grpc
dial.go#L206: if strings.Contains(defaultEndpoint, domain) {
dial.go#L274: if strings.Contains(endpoint, "://") && !strings.HasPrefix(endpoint, "dns:///") {
dial.go#L282: if api != "" && strings.Contains(endpoint, api) {
google.golang.org/api/transport/http
dial.go#L276: if strings.Contains(settings.Endpoint, "://") {
google.golang.org/grpc/internal/transport
handler_server.go#L459: if strings.Contains(err.Error(), "body closed by handler") {
google.golang.org/protobuf/encoding/protojson
well_known_types.go#L879: if strings.Contains(s0, "_") || !pref.FullName(s).IsValid() {
google.golang.org/protobuf/internal/descfmt
stringer.go#L286: if isMulti := strings.Contains(r[1], "\n"); isMulti {
google.golang.org/protobuf/internal/version
version.go#L74: if strings.Contains(PreRelease, "devel") && metadata != "" {
gopkg.in/yaml.v2
encode.go#L327: case strings.Contains(s, "\n"):
html/template
attr.go#L169: if strings.Contains(name, "src") ||
attr.go#L170: strings.Contains(name, "uri") ||
attr.go#L171: strings.Contains(name, "url") {
internal/goroot
gc.go#L106: if strings.Contains(path[:i], ".") {
net/http
cookie.go#L284: if net.ParseIP(v) != nil && !strings.Contains(v, ":") {
fs.go#L729: if !strings.Contains(v, "..") {
h2_bundle.go#L3114: if strings.Contains(e, "http2debug=1") {
h2_bundle.go#L3117: if strings.Contains(e, "http2debug=2") {
h2_bundle.go#L4243: if strings.Contains(str, "use of closed network connection") {
h2_bundle.go#L6485: if !strings.Contains(v, ",") {
server.go#L1497: if !strings.Contains(v, ",") {
server.go#L3242: if omitBundledHTTP2 || strings.Contains(os.Getenv("GODEBUG"), "http2server=0") {
transport.go#L362: if strings.Contains(os.Getenv("GODEBUG"), "http2client=0") {
net/url
url.go#L599: if !strings.Contains(userinfo, ":") {
os/exec
lp_unix.go#L40: if strings.Contains(file, "/") {
path/filepath
match.go#L52: return !strings.Contains(name, string(Separator)), nil
regexp
regexp.go#L572: if strings.Contains(repl, "$") {
 |
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. |