Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 67 for unquote (0.15 sec)

  1. src/encoding/json/decode.go

    			c = c - 'A' + 10
    		default:
    			return -1
    		}
    		r = r*16 + rune(c)
    	}
    	return r
    }
    
    // unquote converts a quoted JSON string literal s into an actual string t.
    // The rules are different than for Go, so cannot use strconv.Unquote.
    func unquote(s []byte) (t string, ok bool) {
    	s, ok = unquoteBytes(s)
    	t = string(s)
    	return
    }
    
    // unquoteBytes should be an internal detail,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 35.3K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/types2/check_test.go

    					panic("unreachable")
    				}
    			}
    			unquoted, err := strconv.Unquote(strings.TrimSpace(pattern))
    			if err != nil {
    				t.Errorf("%s:%d:%d: invalid ERROR pattern (cannot unquote %s)", filename, line, want.Pos.Col(), pattern)
    				continue
    			}
    			if substr {
    				if !strings.Contains(gotMsg, unquoted) {
    					continue
    				}
    			} else {
    				rx, err := regexp.Compile(unquoted)
    				if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 19:45:33 UTC 2024
    - 13.8K bytes
    - Viewed (0)
  3. src/go/types/check_test.go

    					panic("unreachable")
    				}
    			}
    			unquoted, err := strconv.Unquote(strings.TrimSpace(pattern))
    			if err != nil {
    				t.Errorf("%s:%d:%d: invalid ERROR pattern (cannot unquote %s)", filename, line, want.col, pattern)
    				continue
    			}
    			if substr {
    				if !strings.Contains(gotMsg, unquoted) {
    					continue
    				}
    			} else {
    				rx, err := regexp.Compile(unquoted)
    				if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 19:45:33 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  4. src/go/build/read.go

    		if !ok {
    			continue
    		}
    		for _, dspec := range d.Specs {
    			spec, ok := dspec.(*ast.ImportSpec)
    			if !ok {
    				continue
    			}
    			quoted := spec.Path.Value
    			path, err := strconv.Unquote(quoted)
    			if err != nil {
    				return fmt.Errorf("parser returned invalid quoted string: <%s>", quoted)
    			}
    			if !isValidImport(path) {
    				// The parser used to return a parse error for invalid import paths, but
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  5. pkg/model/proxy.go

    	out := append([]byte{'"'}, b...)
    	out = append(out, '"')
    	return out, nil
    }
    
    func (l *PodPortList) UnmarshalJSON(data []byte) error {
    	var pl []PodPort
    	pls, err := strconv.Unquote(string(data))
    	if err != nil {
    		return err
    	}
    	if err := json.Unmarshal([]byte(pls), &pl); err != nil {
    		return err
    	}
    	*l = pl
    	return nil
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 25 17:18:17 UTC 2024
    - 18.7K bytes
    - Viewed (0)
  6. pkg/bootstrap/config.go

    		sl := strings.SplitN(line, "=", 2)
    		if len(sl) != 2 {
    			continue
    		}
    		key := sl[0]
    		// Strip the leading/trailing quotes
    		val, err := strconv.Unquote(sl[1])
    		if err != nil {
    			return nil, fmt.Errorf("failed to unquote %v: %v", sl[1], err)
    		}
    		res[key] = val
    	}
    	return res, nil
    }
    
    func removeDuplicates(values []string) []string {
    	set := sets.New[string]()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 14 17:02:38 UTC 2024
    - 27.6K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/tools/internal/analysisinternal/analysis.go

    			return ast.NewIdent(t.Obj().Name())
    		}
    		pkgName := t.Obj().Pkg().Name()
    
    		// If the file already imports the package under another name, use that.
    		for _, cand := range f.Imports {
    			if path, _ := strconv.Unquote(cand.Path.Value); path == t.Obj().Pkg().Path() {
    				if cand.Name != nil && cand.Name.Name != "" {
    					pkgName = cand.Name.Name
    				}
    			}
    		}
    		if pkgName == "." {
    			return ast.NewIdent(t.Obj().Name())
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 11.7K bytes
    - Viewed (0)
  8. src/cmd/vendor/golang.org/x/mod/modfile/read.go

    		return
    
    	case '"', '`': // quoted string
    		quote := c
    		in.readRune()
    		for {
    			if in.eof() {
    				in.pos = in.token.pos
    				in.Error("unexpected EOF in string")
    			}
    			if in.peekRune() == '\n' {
    				in.Error("unexpected newline in string")
    			}
    			c := in.readRune()
    			if c == quote {
    				break
    			}
    			if c == '\\' && quote != '`' {
    				if in.eof() {
    					in.pos = in.token.pos
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  9. src/go/doc/example.go

    			if s.Path.ValuePos < start {
    				return groupStarts[i-1]
    			}
    		}
    		return groupStarts[len(groupStarts)-1]
    	}
    
    	for _, s := range file.Imports {
    		p, err := strconv.Unquote(s.Path.Value)
    		if err != nil {
    			continue
    		}
    		if p == "syscall/js" {
    			// We don't support examples that import syscall/js,
    			// because the package syscall/js is not available in the playground.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 21.4K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/types2/resolver.go

    		n := names[r]
    		check.errorf(n, code, "missing init expr for %s", n.Value)
    	}
    }
    
    func validatedImportPath(path string) (string, error) {
    	s, err := strconv.Unquote(path)
    	if err != nil {
    		return "", err
    	}
    	if s == "" {
    		return "", fmt.Errorf("empty string")
    	}
    	const illegalChars = `!"#$%&'()*,:;<=>?[\]^{|}` + "`\uFFFD"
    	for _, r := range s {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 14:10:44 UTC 2024
    - 26.3K bytes
    - Viewed (0)
Back to top