Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for Newlines (0.17 sec)

  1. src/go/build/build.go

    	switch {
    	case bytes.HasPrefix(data, slashSlash):
    		comment, _, _ = bytes.Cut(data[2:], newline)
    	case bytes.HasPrefix(data, slashStar):
    		var ok bool
    		comment, _, ok = bytes.Cut(data[2:], starSlash)
    		if !ok {
    			// malformed comment
    			return "", 0
    		}
    		if bytes.Contains(comment, newline) {
    			return "", 0
    		}
    	}
    	comment = bytes.TrimSpace(comment)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 62.3K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/syntax/parser.go

    			text := commentText(msg)
    			if (col == colbase || msg[1] == '*') && strings.HasPrefix(text, "line ") {
    				var pos Pos // position immediately following the comment
    				if msg[1] == '/' {
    					// line comment (newline is part of the comment)
    					pos = MakePos(p.file, line+1, colbase)
    				} else {
    					// regular comment
    					// (if the comment spans multiple lines it's not
    					// a valid line directive and will be discarded
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 62.9K bytes
    - Viewed (0)
  3. pilot/pkg/model/telemetry_logging_test.go

    	}{
    		{
    			name:     "empty",
    			expected: EnvoyTextLogFormat,
    		},
    		{
    			name:         "contains newline",
    			formatString: "[%START_TIME%] %REQ(:METHOD)% %REQ(X-ENVOY-ORIGINAL-PATH?:PATH)% \n",
    			expected:     "[%START_TIME%] %REQ(:METHOD)% %REQ(X-ENVOY-ORIGINAL-PATH?:PATH)% \n",
    		},
    		{
    			name:         "miss newline",
    			formatString: "[%START_TIME%] %REQ(:METHOD)% %REQ(X-ENVOY-ORIGINAL-PATH?:PATH)%",
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jun 14 04:34:30 UTC 2024
    - 54K bytes
    - Viewed (0)
  4. src/encoding/xml/marshal_test.go

    			AnyField: AnyHolder{XMLName: Name{Local: "empty"}},
    		},
    	},
    	{
    		ExpectXML: `<a><nested><value>newline: &#xA;; cr: &#xD;; tab: &#x9;;</value></nested><AnyField></AnyField></a>`,
    		Value: &AnyTest{
    			Nested:   "newline: \n; cr: \r; tab: \t;",
    			AnyField: AnyHolder{XMLName: Name{Local: "AnyField"}},
    		},
    	},
    	{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 18:46:41 UTC 2024
    - 66K bytes
    - Viewed (0)
  5. src/regexp/syntax/parse.go

    	Literal                         // treat pattern as literal string
    	ClassNL                         // allow character classes like [^a-z] and [[:space:]] to match newline
    	DotNL                           // allow . to match newline
    	OneLine                         // treat ^ and $ as only matching at beginning and end of text
    	NonGreedy                       // make repetition operators default to non-greedy
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 13:59:01 UTC 2024
    - 52.1K bytes
    - Viewed (0)
  6. src/testing/testing.go

    			// Found a frame that wasn't inside a helper function.
    			return frame
    		}
    	}
    	return firstFrame
    }
    
    // decorate prefixes the string with the file and line of the call site
    // and inserts the final newline if needed and indentation spaces for formatting.
    // This function must be called with c.mu held.
    func (c *common) decorate(s string, skip int) string {
    	frame := c.frameSkip(skip)
    	file := frame.File
    	line := frame.Line
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 76.1K bytes
    - Viewed (0)
  7. src/cmd/go/internal/test/test.go

    			norun = "[-fuzz matches more than one fuzz test, won't fuzz]"
    		}
    		if len(out) > 0 && !bytes.HasSuffix(out, []byte("\n")) {
    			// Ensure that the output ends with a newline before the "ok"
    			// line we're about to print (https://golang.org/issue/49317).
    			cmd.Stdout.Write([]byte("\n"))
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 14:34:32 UTC 2024
    - 71.9K bytes
    - Viewed (0)
  8. pkg/apis/admissionregistration/validation/validation.go

    				allErrors = append(allErrors, field.InternalError(fldPath.Child("valueExpression"), result.Error))
    			}
    		}
    	}
    	return allErrors
    }
    
    var newlineMatcher = regexp.MustCompile(`[\n\r]+`) // valid newline chars in CEL grammar
    func hasNewlines(s string) bool {
    	return newlineMatcher.MatchString(s)
    }
    
    // ValidateValidatingAdmissionPolicyBinding validates a ValidatingAdmissionPolicyBinding before create.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 56.6K bytes
    - Viewed (0)
  9. src/os/os_test.go

    	if _, err := Stat(name); err != nil {
    		t.Skip(err)
    	}
    	data, err := ReadFile(name)
    	if err != nil {
    		t.Fatal(err)
    	}
    	if len(data) == 0 || data[len(data)-1] != '\n' {
    		t.Fatalf("read %s: not newline-terminated: %q", name, data)
    	}
    }
    
    func TestDirFSReadFileProc(t *testing.T) {
    	t.Parallel()
    
    	fsys := DirFS("/")
    	name := "proc/sys/fs/pipe-max-size"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 83.1K bytes
    - Viewed (0)
  10. src/cmd/internal/testdir/testdir_test.go

    	if err != nil {
    		t.Fatal("reading test case .go file:", err)
    	} else if bytes.HasPrefix(srcBytes, []byte{'\n'}) {
    		t.Fatal(".go file source starts with a newline")
    	}
    	src := string(srcBytes)
    
    	// Execution recipe is contained in a comment in
    	// the first non-empty line that is not a build constraint.
    	var action string
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 21 20:08:06 UTC 2024
    - 57.5K bytes
    - Viewed (0)
Back to top