func bytes.HasPrefix
34 uses
bytes (current package)
bytes.go#L541: func HasPrefix(s, prefix []byte) bool {
bytes.go#L804: if HasPrefix(s, prefix) {
crypto/tls
common.go#L831: (bytes.HasPrefix(c.SessionTicketKey[:], deprecatedSessionTicketKey) || len(c.sessionTicketKeys) > 0) {
common.go#L849: } else if !bytes.HasPrefix(c.SessionTicketKey[:], deprecatedSessionTicketKey) && len(c.sessionTicketKeys) == 0 {
crypto/x509
x509.go#L1626: if bytes.HasPrefix(crlBytes, pemCRLPrefix) {
encoding/pem
pem.go#L92: if bytes.HasPrefix(rest, pemStart[1:]) {
pem.go#L136: if len(p.Headers) == 0 && bytes.HasPrefix(rest, pemEnd[1:]) {
pem.go#L158: if !bytes.HasPrefix(endTrailer, typeLine) ||
github.com/go-pg/migrations/v8
collection.go#L285: if bytes.HasPrefix(b, []byte(prefix)) {
go/build
build.go#L1260: case bytes.HasPrefix(data, slashSlash):
build.go#L1262: case bytes.HasPrefix(data, slashStar):
build.go#L1300: if bytes.HasPrefix(data, slashSlash) {
build.go#L1308: if bytes.HasPrefix(data, slashStar) {
build.go#L1490: if !bytes.HasPrefix(line, goBuildComment) {
build.go#L1550: if !bytes.HasPrefix(line, bSlashSlash) || !bytes.Contains(line, bPlusBuild) {
build.go#L1595: if !bytes.HasPrefix(line, slashSlash) { // Not comment line
build.go#L1619: if bytes.HasPrefix(line, bSlashSlash) {
build.go#L1622: if bytes.HasPrefix(line, bSlashStar) {
go/scanner
scanner.go#L218: if next >= 0 /* implies valid comment */ && (lit[1] == '*' || offs == s.lineOffset) && bytes.HasPrefix(lit[2:], prefix) {
golang.org/x/tools/go/gcexportdata
gcexportdata.go#L122: if bytes.HasPrefix(data, []byte("!<arch>")) {
golang.org/x/tools/txtar
archive.go#L118: if !bytes.HasPrefix(data, marker) {
google.golang.org/protobuf/internal/encoding/json
decode.go#L245: if !bytes.HasPrefix(b, []byte(s)) {
html/template
escape.go#L733: if s[j] == '<' && !bytes.HasPrefix(bytes.ToUpper(s[j:]), doctypeBytes) {
mellium.im/sasl
scram.go#L162: case nonce == nil || !bytes.HasPrefix(nonce, m.Nonce()):
mime/multipart
multipart.go#L221: if bytes.HasPrefix(buf, dashBoundary) {
multipart.go#L231: if bytes.HasPrefix(dashBoundary, buf) {
multipart.go#L247: if bytes.HasPrefix(nlDashBoundary, buf) {
multipart.go#L256: if i >= 0 && bytes.HasPrefix(nlDashBoundary, buf[i:]) {
multipart.go#L390: if !bytes.HasPrefix(line, mr.dashBoundaryDash) {
multipart.go#L405: if !bytes.HasPrefix(line, mr.dashBoundary) {
mime/quotedprintable
reader.go#L97: if !bytes.HasPrefix(rightStripped, lf) && !bytes.HasPrefix(rightStripped, crlf) &&
net/http
sniff.go#L208: if bytes.HasPrefix(data, e.sig) {
regexp
regexp.go#L452: return bytes.HasPrefix(i.str, re.prefixBytes)