func bytes.HasPrefix
32 uses
bytes (current package)
bytes.go#L594: func HasPrefix(s, prefix []byte) bool {
bytes.go#L881: if HasPrefix(s, prefix) {
bytes.go#L1422: if !HasPrefix(s, prefix) {
crypto/tls
common.go#L976: (bytes.HasPrefix(c.SessionTicketKey[:], deprecatedSessionTicketKey) || len(c.sessionTicketKeys) > 0) {
common.go#L994: } else if !bytes.HasPrefix(c.SessionTicketKey[:], deprecatedSessionTicketKey) && len(c.sessionTicketKeys) == 0 {
crypto/x509
x509.go#L1807: if bytes.HasPrefix(crlBytes, pemCRLPrefix) {
encoding/pem
pem.go#L94: if bytes.HasPrefix(rest, pemStart[1:]) {
pem.go#L138: if len(p.Headers) == 0 && bytes.HasPrefix(rest, pemEnd[1:]) {
pem.go#L160: if !bytes.HasPrefix(endTrailer, typeLine) ||
go/build
build.go#L1326: case bytes.HasPrefix(data, slashSlash):
build.go#L1328: case bytes.HasPrefix(data, slashStar):
build.go#L1366: if bytes.HasPrefix(data, slashSlash) {
build.go#L1374: if bytes.HasPrefix(data, slashStar) {
build.go#L1552: if !bytes.HasPrefix(line, goBuildComment) {
build.go#L1612: if !bytes.HasPrefix(line, slashSlash) || !bytes.Contains(line, plusBuild) {
build.go#L1666: if !bytes.HasPrefix(line, slashSlash) { // Not comment line
build.go#L1690: if bytes.HasPrefix(line, slashSlash) {
build.go#L1693: if bytes.HasPrefix(line, slashStar) {
go/scanner
scanner.go#L220: if next >= 0 /* implies valid comment */ && (lit[1] == '*' || offs == s.lineOffset) && bytes.HasPrefix(lit[2:], prefix) {
golang.org/x/tools/go/gcexportdata
gcexportdata.go#L163: if bytes.HasPrefix(data, []byte("!<arch>")) {
google.golang.org/protobuf/internal/encoding/json
decode.go#L245: if !bytes.HasPrefix(b, []byte(s)) {
html/template
escape.go#L761: if s[j] == '<' && !bytes.HasPrefix(bytes.ToUpper(s[j:]), doctypeBytes) {
mime/multipart
multipart.go#L242: if bytes.HasPrefix(buf, dashBoundary) {
multipart.go#L252: if bytes.HasPrefix(dashBoundary, buf) {
multipart.go#L268: if bytes.HasPrefix(nlDashBoundary, buf) {
multipart.go#L277: if i >= 0 && bytes.HasPrefix(nlDashBoundary, buf[i:]) {
multipart.go#L448: if !bytes.HasPrefix(line, r.dashBoundaryDash) {
multipart.go#L463: if !bytes.HasPrefix(line, r.dashBoundary) {
mime/quotedprintable
reader.go#L97: if !bytes.HasPrefix(rightStripped, lf) && !bytes.HasPrefix(rightStripped, crlf) &&
net/http
sniff.go#L203: if bytes.HasPrefix(data, e.sig) {
regexp
regexp.go#L448: return bytes.HasPrefix(i.str, re.prefixBytes)