Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 176 for unquote (0.12 sec)

  1. src/internal/trace/testtrace/expectation.go

    		default:
    			return exp, fmt.Errorf("bad header line: %q", s.Text())
    		}
    		return exp, nil
    	}
    	return exp, s.Err()
    }
    
    func parseMatcher(quoted string) (*regexp.Regexp, error) {
    	pattern, err := strconv.Unquote(quoted)
    	if err != nil {
    		return nil, fmt.Errorf("malformed pattern: not correctly quoted: %s: %v", quoted, err)
    	}
    	matcher, err := regexp.Compile(pattern)
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. src/internal/trace/raw/textreader.go

    func readData(line string) ([]byte, error) {
    	parts := strings.SplitN(line, "=", 2)
    	if len(parts) < 2 || strings.TrimSpace(parts[0]) != "data" {
    		return nil, fmt.Errorf("malformed data: %q", line)
    	}
    	data, err := strconv.Unquote(strings.TrimSpace(parts[1]))
    	if err != nil {
    		return nil, fmt.Errorf("failed to parse data: %q: %v", line, err)
    	}
    	return []byte(data), nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  5. 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)
  6. 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)
  7. 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)
  8. src/go/ast/import.go

    			}
    		}
    	}
    }
    
    func lineAt(fset *token.FileSet, pos token.Pos) int {
    	return fset.PositionFor(pos, false).Line
    }
    
    func importPath(s Spec) string {
    	t, err := strconv.Unquote(s.(*ImportSpec).Path.Value)
    	if err == nil {
    		return t
    	}
    	return ""
    }
    
    func importName(s Spec) string {
    	n := s.(*ImportSpec).Name
    	if n == nil {
    		return ""
    	}
    	return n.Name
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top