func strings.HasPrefix

181 uses

	strings (current package)
		replace.go#L246: 		} else if node.prefix != "" && HasPrefix(s, node.prefix) {
		search.go#L73: 		if HasPrefix(pattern, pattern[i+1:]) {
		strings.go#L448: func HasPrefix(s, prefix string) bool {
		strings.go#L976: 	if HasPrefix(s, prefix) {

	crypto/x509
		verify.go#L430: 	if strings.HasPrefix(host, "[") && strings.HasSuffix(host, "]") ||

	encoding/asn1
		common.go#L118: 		case strings.HasPrefix(part, "default:"):
		common.go#L124: 		case strings.HasPrefix(part, "tag:"):

	flag
		flag.go#L863: 	if strings.HasPrefix(name, "-") {

	github.com/aws/aws-sdk-go-v2/aws/arn
		arn.go#L62: 	if !strings.HasPrefix(arn, arnPrefix) {
		arn.go#L81: 	return strings.HasPrefix(arn, arnPrefix) && strings.Count(arn, ":") >= arnSections-1

	github.com/aws/aws-sdk-go-v2/service/internal/s3shared
		resource_request.go#L75: 	return strings.HasPrefix(region, "fips-") ||

	github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn
		accesspoint_arn.go#L52: 	return strings.HasPrefix(region, "fips-") || strings.HasSuffix(region, "-fips")

	github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations
		host.go#L18: 	if strings.HasPrefix(host, oldEndpointPrefix) {
		update_endpoint.go#L212: 		if parts[0] == "s3" || strings.HasPrefix(parts[0], "s3-") {
		update_endpoint.go#L240: 	if strings.HasPrefix(u.Path, "/"+bucket) {

	github.com/aws/smithy-go/transport/http
		middleware_min_proto.go#L62: 	if !strings.HasPrefix(response.Proto, "HTTP") {

	github.com/go-pg/pg/v10/orm
		table.go#L436: 	} else if strings.HasPrefix(field.SQLName, "fk_") {
		table.go#L1390: 		if !strings.HasPrefix(pk.SQLName, "pk_") {

	github.com/golang/protobuf/jsonpb
		decode.go#L349: 		if !strings.HasPrefix(name, "[") || !strings.HasSuffix(name, "]") {

	github.com/golang/protobuf/proto
		properties.go#L145: 		case strings.HasPrefix(s, "name="):
		properties.go#L147: 		case strings.HasPrefix(s, "json="):
		properties.go#L149: 		case strings.HasPrefix(s, "enum="):
		properties.go#L151: 		case strings.HasPrefix(s, "weak="):
		properties.go#L183: 		case strings.HasPrefix(s, "def="):
		properties.go#L250: 		if tagField == "" && tagOneof == "" && !strings.HasPrefix(p.Name, "XXX_") {
		text_decode.go#L393: 		if strings.HasPrefix(tok.value, "0x") {
		text_decode.go#L406: 		if strings.HasPrefix(tok.value, "0x") {

	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_reflect.go#L333: 		isTripleQuoted = !strings.HasPrefix(strings.TrimPrefix(line, prefix), `"""`) && !strings.HasPrefix(line, "...") && strings.TrimFunc(line, isPrintable) == "" && len(line) <= maxLen
		report_slices.go#L209: 				isTripleQuoted = !strings.HasPrefix(line, `"""`) && !strings.HasPrefix(line, "...") && strings.TrimFunc(line, isPrintable) == ""

	github.com/robfig/cron/v3
		parser.go#L95: 	if strings.HasPrefix(spec, "TZ=") || strings.HasPrefix(spec, "CRON_TZ=") {
		parser.go#L106: 	if strings.HasPrefix(spec, "@") {
		parser.go#L425: 	if strings.HasPrefix(descriptor, every) {

	github.com/valyala/fastjson/fastfloat
		parse.go#L243: 		if strings.HasPrefix(s, "+") {
		parse.go#L401: 		if strings.HasPrefix(ss, "+") {

	go.pact.im/x/goupdate
		textgen.go#L65: 			if !failed && !strings.HasPrefix(out, "ok  \t") && !strings.HasPrefix(out, "?   \t") {

	go.pact.im/x/phcformat
		parse.go#L61: 	if prefix := "v="; strings.HasPrefix(s, prefix) {

	go.uber.org/goleak
		options.go#L158: 		return strings.HasPrefix(s.State(), "chan receive")
		options.go#L166: 	return s.FirstFunction() == "runtime.goexit" && strings.HasPrefix(s.State(), "syscall")

	go.uber.org/goleak/internal/stack
		stacks.go#L86: 		if strings.HasPrefix(line, "goroutine ") {

	go/ast
		ast.go#L166: 	if strings.HasPrefix(c, "line ") {

	go/build
		build.go#L183: 	if !strings.HasPrefix(dir, root) {
		build.go#L234: 		if strings.HasPrefix(p, "~") {
		build.go#L584: 			return strings.Contains(sub, "/testdata/") || strings.HasSuffix(sub, "/testdata") || strings.HasPrefix(sub, "testdata/") || sub == "testdata"
		build.go#L627: 		if strings.HasPrefix(path, "/") {
		build.go#L650: 				if !ok || !strings.HasPrefix(sub, "src/") || strings.Contains(sub, "/testdata/") {
		build.go#L691: 			gorootFirst := srcDir == "" || !strings.HasPrefix(path, "vendor/")
		build.go#L854: 			if strings.HasPrefix(name, "_") || strings.HasPrefix(name, ".") {
		build.go#L1397: 	if strings.HasPrefix(name, "_") ||
		build.go#L1398: 		strings.HasPrefix(name, ".") {
		build.go#L1754: 		} else if strings.HasPrefix(arg, "-I") || strings.HasPrefix(arg, "-L") {
		build.go#L1987: 		strings.HasPrefix(path, "./") || strings.HasPrefix(path, "../")

	go/build/constraint
		expr.go#L179: 	if !strings.HasPrefix(line, "//go:build") {
		expr.go#L369: 	if !strings.HasPrefix(line, "//") {
		expr.go#L376: 	if !strings.HasPrefix(line, "+build") {
		expr.go#L401: 			if strings.HasPrefix(lit, "!!") || lit == "!" {
		expr.go#L404: 				if strings.HasPrefix(lit, "!") {

	go/doc
		comment.go#L243: 		if b != "s" && !strings.HasPrefix(b, "s ") {
		comment.go#L254: 		if b == "" || strings.HasPrefix(b, " ") {
		comment.go#L480: 	isComment := strings.HasPrefix(text, "//")
		comment.go#L488: 			needsPrefix = isComment && !strings.HasPrefix(f, "//")
		example.go#L140: 	if !strings.HasPrefix(name, prefix) {
		example.go#L390: 	if len(comments) > 0 && strings.HasPrefix(comments[0].Text(), "Copyright") {
		synopsis.go#L71: 		if strings.HasPrefix(strings.ToLower(s), prefix) {

	go/printer
		printer.go#L643: 	if strings.HasPrefix(text, linePrefix) && (!pos.IsValid() || pos.Column == 1) {

	go/types
		call.go#L506: 				if pkg.cgo && strings.HasPrefix(exp.name, "_Cvar_") {
		call.go#L512: 				if pkg.cgo && strings.HasPrefix(exp.name, "_Cmacro_") {

	golang.org/x/exp/apidiff
		messageset.go#L45: 			if strings.HasPrefix(part, ",") {

	golang.org/x/net/http/httpguts
		guts.go#L22: 	if strings.HasPrefix(name, "If-") || badTrailer[name] {

	golang.org/x/net/http2
		frame.go#L1547: 		isPseudo := strings.HasPrefix(hf.Name, ":")
		server.go#L2693: 		if !strings.HasPrefix(k, TrailerPrefix) {
		server.go#L2993: 		if !strings.HasPrefix(target, "/") {
		server.go#L3007: 		if strings.HasPrefix(k, ":") {
		transport.go#L531: 	if strings.HasPrefix(host, "[") && strings.HasSuffix(host, "]") {

	golang.org/x/net/idna
		idna10.0.0.go#L365: 		if strings.HasPrefix(label, acePrefix) {

	golang.org/x/net/trace
		events.go#L383: 		if strings.HasPrefix(name, "runtime.") {

	golang.org/x/tools/go/packages
		golist.go#L781: 		if !strings.HasPrefix(absDir, rdir) {
		golist.go#L984: 		for strings.HasPrefix(msg, "go: downloading") {
		golist.go#L987: 		if len(stderr.String()) > 0 && strings.HasPrefix(stderr.String(), "# ") {
		golist.go#L989: 			if strings.HasPrefix(strings.TrimLeftFunc(msg, isPkgPathRune), "\n") {
		golist.go#L993: 			if strings.HasPrefix(msg, "pkg-config") {
		golist.go#L1063: 			if colon > 0 && strings.HasPrefix(stderrStr, "go build ") {
		golist_overlay.go#L492: 	maybeXTest := strings.HasPrefix(oldName+"_test", newName) || strings.HasSuffix(newName, "_test")

	golang.org/x/tools/internal/gcimporter
		exportdata.go#L79: 	if !strings.HasPrefix(string(line), "go object ") {
		iexport.go#L890: 	if strings.HasPrefix(name, blankMarker) {

	golang.org/x/tools/internal/gocommand
		version.go#L35: 		if strings.HasPrefix(f, "mod=") || strings.HasPrefix(f, "modfile=") {

	google.golang.org/grpc
		clientconn.go#L1634: 	case strings.HasPrefix(target, "unix:") || strings.HasPrefix(target, "unix-abstract:"):
		clientconn.go#L1638: 	case strings.HasPrefix(endpoint, ":"):

	google.golang.org/grpc/internal/binarylog
		method_logger.go#L392: 	return strings.HasPrefix(key, "grpc-")

	google.golang.org/grpc/internal/grpcutil
		method.go#L29: 	if !strings.HasPrefix(methodName, "/") {
		method.go#L65: 	if !strings.HasPrefix(contentType, baseContentType) {

	google.golang.org/grpc/internal/resolver/dns
		dns_resolver.go#L311: 	if !strings.HasPrefix(res, txtAttribute) {

	google.golang.org/grpc/internal/transport
		http2_client.go#L161: 		if networkType == "unix" && !strings.HasPrefix(address, "\x00") {

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

	google.golang.org/protobuf/internal/encoding/tag
		tag.go#L41: 		case strings.HasPrefix(s, "name="):
		tag.go#L102: 		case strings.HasPrefix(s, "enum="):
		tag.go#L104: 		case strings.HasPrefix(s, "json="):
		tag.go#L112: 		case strings.HasPrefix(s, "weak="):
		tag.go#L115: 		case strings.HasPrefix(s, "def="):

	google.golang.org/protobuf/internal/impl
		legacy_message.go#L131: 				if f.Tag.Get("protobuf") != "" || f.Tag.Get("protobuf_oneof") != "" || strings.HasPrefix(f.Name, "XXX_") {

	google.golang.org/protobuf/reflect/protodesc
		proto.go#L248: 	if strings.HasPrefix(string(d.FullName()), unknownPrefix) {

	gotest.tools/v3/assert/cmp
		compare.go#L51: 	case strings.HasPrefix(panicmsg, "cannot handle unexported field"):

	gotest.tools/v3/internal/source
		update.go#L145: 			if strings.HasPrefix(strings.ToLower(e.Name), "expected") {
		version.go#L15: 	if !strings.HasPrefix(version, "go") {

	html/template
		attr.go#L141: 	if strings.HasPrefix(name, "data-") {
		attr.go#L157: 	if strings.HasPrefix(name, "on") {

	internal/buildcfg
		exp.go#L101: 			if strings.HasPrefix(f, "no") {

	internal/goroot
		gc.go#L72: 		if strings.HasPrefix(dirEntry, prefix) {

	internal/profile
		legacy_profile.go#L95: 		if strings.HasPrefix(line, "---") {
		legacy_profile.go#L189: 	if m := p.Mapping[0]; strings.HasPrefix(m.File, "/anon_hugepage") {
		legacy_profile.go#L702: 	if strings.HasPrefix(l, "--- contentionz ") {
		legacy_profile.go#L704: 	} else if strings.HasPrefix(l, "--- mutex:") {
		legacy_profile.go#L706: 	} else if strings.HasPrefix(l, "--- contention:") {
		legacy_profile.go#L749: 		if strings.HasPrefix(l, "---") {
		legacy_profile.go#L789: 			if l = strings.TrimSpace(l); strings.HasPrefix(l, "---") {
		legacy_profile.go#L915: 		if strings.HasPrefix(line, "---- no stack trace for") {
		legacy_profile.go#L985: 		if strings.HasPrefix(l, "---") {
		profile.go#L209: 		if strings.HasPrefix(file, "[") {

	mime
		encodedword.go#L201: 	if len(word) < 8 || !strings.HasPrefix(word, "=?") || !strings.HasSuffix(word, "?=") || strings.Count(word, "?") != 4 {
		mediatype.go#L111: 	if !strings.HasPrefix(rest, "/") {
		mediatype.go#L323: 	if !strings.HasPrefix(rest, ";") {
		mediatype.go#L336: 	if !strings.HasPrefix(rest, "=") {
		type.go#L168: 	if !strings.HasPrefix(ext, ".") {
		type.go#L180: 	if strings.HasPrefix(mimeType, "text/") && param["charset"] == "" {

	net/http
		fs.go#L347: 	if strings.HasPrefix(s, "W/") {
		fs.go#L846: 	if !strings.HasPrefix(upath, "/") {
		fs.go#L876: 	if !strings.HasPrefix(s, b) {
		h2_bundle.go#L2869: 		isPseudo := strings.HasPrefix(hf.Name, ":")
		h2_bundle.go#L6295: 		if !strings.HasPrefix(k, http2TrailerPrefix) {
		h2_bundle.go#L6506: 		if !strings.HasPrefix(target, "/") {
		h2_bundle.go#L6520: 		if strings.HasPrefix(k, ":") {
		h2_bundle.go#L7192: 	if strings.HasPrefix(host, "[") && strings.HasSuffix(host, "]") {
		request.go#L768: 	if !strings.HasPrefix(host, "[") {
		request.go#L792: 	if !strings.HasPrefix(vers, "HTTP/") {
		request.go#L1061: 	justAuthority := req.Method == "CONNECT" && !strings.HasPrefix(rawurl, "/")
		server.go#L506: 		if strings.HasPrefix(k, TrailerPrefix) {
		server.go#L1124: 		if !strings.HasPrefix(frame.Function, "net/http.") {
		server.go#L1260: 		if strings.HasPrefix(k, TrailerPrefix) {
		server.go#L2301: 		if len(p) == len(np)+1 && strings.HasPrefix(p, np) {
		server.go#L2335: 		if strings.HasPrefix(path, e.pattern) {

	net/http/httptest
		httptest.go#L81: 	if strings.HasPrefix(target, "https://") {
		recorder.go#L225: 		if !strings.HasPrefix(k, http.TrailerPrefix) {
		server.go#L94: 		if strings.HasPrefix(s, pre) {

	net/http/httputil
		dump.go#L246: 	absRequestURI := strings.HasPrefix(req.RequestURI, "http://") || strings.HasPrefix(req.RequestURI, "https://")
		reverseproxy.go#L106: 	bslash := strings.HasPrefix(b, "/")
		reverseproxy.go#L126: 	bslash := strings.HasPrefix(bpath, "/")

	net/http/pprof
		pprof.go#L368: 	if strings.HasPrefix(r.URL.Path, "/debug/pprof/") {

	net/url
		url.go#L526: 	if !strings.HasPrefix(rest, "/") {
		url.go#L548: 	if (url.Scheme != "" || !viaRequest && !strings.HasPrefix(rest, "///")) && strings.HasPrefix(rest, "//") {
		url.go#L607: 	if strings.HasPrefix(host, "[") {
		url.go#L1118: 		if strings.HasPrefix(result, "//") {
		url.go#L1156: 	if strings.HasPrefix(host, "[") && strings.HasSuffix(host, "]") {

	path/filepath
		path_unix.go#L13: 	return strings.HasPrefix(path, "/")
		path_unix.go#L27: 	return strings.HasPrefix(p, prefix)

	regexp
		regexp.go#L405: 	return strings.HasPrefix(i.str, re.prefix)

	runtime/debug
		mod.go#L168: 		case strings.HasPrefix(line, pathLine):
		mod.go#L171: 		case strings.HasPrefix(line, modLine):
		mod.go#L178: 		case strings.HasPrefix(line, depLine):
		mod.go#L186: 		case strings.HasPrefix(line, repLine):
		mod.go#L200: 		case strings.HasPrefix(line, buildLine):

	runtime/pprof
		pprof.go#L502: 		} else if name != "runtime.goexit" && (show || !strings.HasPrefix(name, "runtime.")) {
		protomem.go#L38: 					if f := runtime.FuncForPC(addr); f != nil && strings.HasPrefix(f.Name(), "runtime.") {

	text/template/parse
		lex.go#L286: 	if hasRightTrimMarker(l.input[l.pos:]) && strings.HasPrefix(l.input[l.pos+trimMarkerLen:], l.rightDelim) { // With trim marker.
		lex.go#L289: 	if strings.HasPrefix(l.input[l.pos:], l.rightDelim) { // Without trim marker.
		lex.go#L308: 	if strings.HasPrefix(l.input[l.pos+afterMarker:], leftComment) {
		lex.go#L445: 	if hasRightTrimMarker(l.input[l.pos-1:]) && strings.HasPrefix(l.input[l.pos-1+trimMarkerLen:], l.rightDelim) {

	vendor/golang.org/x/net/http/httpguts
		guts.go#L22: 	if strings.HasPrefix(name, "If-") || badTrailer[name] {

	vendor/golang.org/x/net/http/httpproxy
		proxy.go#L262: 		if strings.HasPrefix(phost, "*.") {

	vendor/golang.org/x/net/idna
		idna10.0.0.go#L365: 		if strings.HasPrefix(label, acePrefix) {