- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for PrefixToPath (0.17 sec)
-
src/cmd/internal/objabi/path_test.go
} } } func TestPrefixToPath(t *testing.T) { for _, tc := range escapeTests { got, err := PrefixToPath(tc.Escaped) if err != nil { t.Errorf("expected PrefixToPath(%s) err = nil, got %v", tc.Escaped, err) } if got != tc.Path { t.Errorf("expected PrefixToPath(%s) = %s, got %s", tc.Escaped, tc.Path, got) } } } func TestPrefixToPathError(t *testing.T) { tests := []string{
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 13 13:56:25 UTC 2023 - 2.3K bytes - Viewed (0) -
src/cmd/internal/objabi/path.go
p = append(p, '%', hex[c>>4], hex[c&0xF]) } else { p = append(p, c) } } return string(p) } // PrefixToPath is the inverse of PathToPrefix, replacing escape sequences with // the original character. func PrefixToPath(s string) (string, error) { percent := strings.IndexByte(s, '%') if percent == -1 { return s, nil } p := make([]byte, 0, len(s))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 13 13:56:25 UTC 2023 - 1.9K bytes - Viewed (0) -
src/cmd/compile/internal/ir/func.go
func ParseLinkFuncName(name string) (pkg, sym string, err error) { pkg, sym = splitPkg(name) if pkg == "" { return "", "", fmt.Errorf("no package path in name") } pkg, err = objabi.PrefixToPath(pkg) // unescape if err != nil { return "", "", fmt.Errorf("malformed package path: %v", err) } return pkg, sym, nil } // Borrowed from x/mod. func modPathOK(r rune) bool {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:05:44 UTC 2024 - 21.1K bytes - Viewed (0)