- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 97 for toText (0.16 sec)
-
src/bufio/scan_test.go
} numSplits++ return 1, data[0:1], nil } // Read the data. const text = "abcdefghijklmnopqrstuvwxyz" buf := strings.NewReader(text) s := NewScanner(&slowReader{1, buf}) s.Split(errorSplit) var i int for i = 0; s.Scan(); i++ { if len(s.Bytes()) != 1 || text[i] != s.Bytes()[0] { t.Errorf("#%d: expected %q got %q", i, text[i], s.Bytes()[0]) } } // Check correct termination location and error.
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Sep 22 16:22:42 GMT 2023 - 14.3K bytes - Viewed (0) -
misc/go_android_exec/exitcode_test.go
) func TestExitCodeFilter(t *testing.T) { // Write text to the filter one character at a time. var out strings.Builder f, exitStr := newExitCodeFilter(&out) // Embed a "fake" exit code in the middle to check that we don't get caught on it. pre := "abc" + exitStr + "123def" text := pre + exitStr + `1` for i := 0; i < len(text); i++ { _, err := f.Write([]byte{text[i]}) if err != nil { t.Fatal(err) } }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed May 03 14:54:58 GMT 2023 - 2.1K bytes - Viewed (0) -
src/cmd/asm/internal/lex/slice.go
} return s.tokens[s.pos].ScanToken } func (s *Slice) Text() string { return s.tokens[s.pos].text } func (s *Slice) File() string { return s.base.Filename() } func (s *Slice) Base() *src.PosBase { return s.base } func (s *Slice) SetBase(base *src.PosBase) { // Cannot happen because we only have slices of already-scanned text, // but be prepared. s.base = base }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Thu Jun 29 22:49:50 GMT 2023 - 1.6K bytes - Viewed (0) -
src/cmd/asm/internal/lex/stack.go
tos.Close() // Pop the topmost item from the stack and resume with the next one down. s.tr = s.tr[:len(s.tr)-1] tok = s.Next() } return tok } func (s *Stack) Text() string { return s.tr[len(s.tr)-1].Text() } func (s *Stack) File() string { return s.Base().Filename() } func (s *Stack) Base() *src.PosBase { return s.tr[len(s.tr)-1].Base() }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Jan 09 22:33:23 GMT 2017 - 1.2K bytes - Viewed (0) -
internal/config/compress/compress_test.go
}{ // invalid input {",,,", []string{}, false}, {"", []string{}, false}, {",", []string{}, false}, {"/", []string{}, false}, {"text/*,/", []string{}, false}, // valid input {".txt,.log", []string{".txt", ".log"}, true}, {"text/*,application/json", []string{"text/*", "application/json"}, true}, } for _, testCase := range testCases { testCase := testCase t.Run(testCase.str, func(t *testing.T) {
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Tue Jun 01 21:59:40 GMT 2021 - 1.8K bytes - Viewed (0) -
istioctl/cmd/root_test.go
t.Helper() if strings.Contains(gotHelpText, flag) != wantExists { if wantExists { t.Errorf("%q flag was expected but not found in help text", flag) } else { t.Errorf("%q flag was found in help text but not expected", flag) } } } func TestHideInheritedFlags(t *testing.T) { const ( parentFlag0 = "parent-flag0" parentFlag1 = "parent-flag1"
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Fri Jan 15 17:59:55 GMT 2021 - 2.4K bytes - Viewed (0) -
internal/config/config.go
dynOnly = true for scanner.Scan() { // Skip any empty lines, or comment like characters text := scanner.Text() if text == "" || strings.HasPrefix(text, KvComment) { continue } dynamic, err := c.SetKVS(text, DefaultKVS) if err != nil { return false, err } dynOnly = dynOnly && dynamic n += len(text) } if err := scanner.Err(); err != nil { return false, err } return dynOnly, nil
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Sat Mar 02 05:11:03 GMT 2024 - 37.3K bytes - Viewed (0) -
clause/expression_test.go
}{{ SQL: "create table ? (? ?, ? ?)", Vars: []interface{}{clause.Table{Name: "users"}, clause.Column{Name: "id"}, clause.Expr{SQL: "int"}, clause.Column{Name: "name"}, clause.Expr{SQL: "text"}}, Result: "create table `users` (`id` int, `name` text)", }} for idx, result := range results { t.Run(fmt.Sprintf("case #%v", idx), func(t *testing.T) { user, _ := schema.Parse(&tests.User{}, &sync.Map{}, db.NamingStrategy)
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Thu Aug 10 05:34:33 GMT 2023 - 8.4K bytes - Viewed (0) -
src/cmd/addr2line/main.go
tab, err := f.PCLineTable() if err != nil { log.Fatalf("reading %s: %v", flag.Arg(0), err) } stdin := bufio.NewScanner(os.Stdin) stdout := bufio.NewWriter(os.Stdout) for stdin.Scan() { p := stdin.Text() if strings.Contains(p, ":") { // Reverse translate file:line to pc. // This was an extension in the old C version of 'go tool addr2line' // and is probably not used by anyone, but recognize the syntax.
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Apr 11 16:34:30 GMT 2022 - 2.3K bytes - Viewed (0) -
istioctl/pkg/authz/listener.go
// See the License for the specific language governing permissions and // limitations under the License. package authz import ( "fmt" "io" "regexp" "sort" "strings" "text/tabwriter" listener "github.com/envoyproxy/go-control-plane/envoy/config/listener/v3" rbacpb "github.com/envoyproxy/go-control-plane/envoy/config/rbac/v3"
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Mon Sep 11 15:29:30 GMT 2023 - 6K bytes - Viewed (0)