- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 22 for HasPrefix (0.34 sec)
-
src/cmd/cgo/internal/test/callback_windows.go
continue } // In module mode, this package has a fully-qualified import path. // Remove it if present. fname = strings.TrimPrefix(fname, "cmd/cgo/internal/") if !strings.HasPrefix(fname, "test.") { continue } got = append(got, fname) } if !reflect.DeepEqual(want, got) { t.Errorf("incorrect backtrace:\nwant:\t%v\ngot:\t%v", want, got) }
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Wed Nov 29 16:01:37 GMT 2023 - 2.6K bytes - Viewed (0) -
src/bytes/bytes.go
b := bytealg.MakeNoZero(n)[:n:n] bp := copy(b, s[0]) for _, v := range s[1:] { bp += copy(b[bp:], sep) bp += copy(b[bp:], v) } return b } // HasPrefix reports whether the byte slice s begins with prefix. func HasPrefix(s, prefix []byte) bool { return len(s) >= len(prefix) && Equal(s[0:len(prefix)], prefix) } // HasSuffix reports whether the byte slice s ends with suffix.
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Mon Feb 19 19:51:15 GMT 2024 - 33.8K bytes - Viewed (0) -
misc/linkcheck/linkcheck.go
problems []string ) func localLinks(body string) (links []string) { seen := map[string]bool{} mv := aRx.FindAllStringSubmatch(body, -1) for _, m := range mv { ref := m[1] if strings.HasPrefix(ref, "/src/") { continue } if !seen[ref] { seen[ref] = true links = append(links, m[1]) } } return } var idRx = regexp.MustCompile(`\bid=['"]?([^\s'">]+)`)
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Wed Oct 06 15:53:04 GMT 2021 - 3.9K bytes - Viewed (0) -
src/cmd/api/api_test.go
*context = build.Default context.Dir = filepath.Join(testenv.GOROOT(t), "src") w := NewWalker(context, context.Dir) for _, pkg := range w.stdPackages { if strings.HasPrefix(pkg, "vendor/") || strings.HasPrefix(pkg, "golang.org/x/") { t.Fatalf("stdPackages contains unexpected package %s", pkg) } } } func TestIssue64958(t *testing.T) { defer func() { if x := recover(); x != nil {
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Thu Jan 04 17:31:12 GMT 2024 - 7.1K bytes - Viewed (0) -
src/bytes/example_test.go
// Output: Fields are: ["foo1" "bar2" "baz3"] } func ExampleHasPrefix() { fmt.Println(bytes.HasPrefix([]byte("Gopher"), []byte("Go"))) fmt.Println(bytes.HasPrefix([]byte("Gopher"), []byte("C"))) fmt.Println(bytes.HasPrefix([]byte("Gopher"), []byte(""))) // Output: // true // false // true } func ExampleHasSuffix() {
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Mon Mar 04 15:54:40 GMT 2024 - 15K bytes - Viewed (1) -
src/cmd/cgo/internal/test/issue1435.go
break } // Fall through in the unlikely case // that filter at some point is // "Pid:\t". } if strings.HasPrefix(line, filter) { if line == expected { foundAThread = true break } if filter == "Groups:" && strings.HasPrefix(line, "Groups:\t") { // https://github.com/golang/go/issues/46145
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Fri Jul 28 21:31:41 GMT 2023 - 7.5K bytes - Viewed (0) -
src/cmd/cgo/gcc.go
func cname(s string) string { if t, ok := nameToC[s]; ok { return t } if strings.HasPrefix(s, "struct_") { return "struct " + s[len("struct_"):] } if strings.HasPrefix(s, "union_") { return "union " + s[len("union_"):] } if strings.HasPrefix(s, "enum_") { return "enum " + s[len("enum_"):] } if strings.HasPrefix(s, "sizeof_") { return "sizeof(" + cname(s[len("sizeof_"):]) + ")" } return s }
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Thu Nov 02 16:43:23 GMT 2023 - 97K bytes - Viewed (0) -
src/cmd/asm/internal/asm/parse.go
// name starts with a period, qualifySymbol prepends the package // prefix. Otherwise it returns name unchanged. func (p *Parser) qualifySymbol(name string) string { if strings.HasPrefix(name, ".") { name = p.pkgPrefix + name } return name } // symbolReference parses a symbol that is known not to be a register. func (p *Parser) symbolReference(a *obj.Addr, name string, prefix rune) {
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Wed Feb 21 14:34:57 GMT 2024 - 36.9K bytes - Viewed (0) -
misc/ios/go_ios_exec.go
var env []string for _, e := range os.Environ() { // Don't override TMPDIR, HOME, GOCACHE on the device. if strings.HasPrefix(e, "TMPDIR=") || strings.HasPrefix(e, "HOME=") || strings.HasPrefix(e, "GOCACHE=") { continue } env = append(env, e) } lldb := exec.Command( "python", "-", // Read script from stdin. target, appdir, deviceapp,
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Mon Apr 11 16:34:30 GMT 2022 - 23.4K bytes - Viewed (0) -
src/cmd/cgo/ast.go
func (f *File) saveExport(x interface{}, context astContext) { n, ok := x.(*ast.FuncDecl) if !ok { return } if n.Doc == nil { return } for _, c := range n.Doc.List { if !strings.HasPrefix(c.Text, "//export ") { continue } name := strings.TrimSpace(c.Text[9:]) if name == "" { error_(c.Pos(), "export missing name") } if name != n.Name.Name {
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Wed Jun 07 16:54:27 GMT 2023 - 14.3K bytes - Viewed (0)