- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 35 for strconv (0.29 sec)
-
src/archive/tar/strconv.go
const padding = 3 // Extra padding for ' ', '=', and '\n' size := len(k) + len(v) + padding size += len(strconv.Itoa(size)) record := strconv.Itoa(size) + " " + k + "=" + v + "\n" // Final adjustment if adding size field increased the record size. if len(record) != size { size = len(record) record = strconv.Itoa(size) + " " + k + "=" + v + "\n" } return record, nil }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Tue Aug 01 14:28:42 GMT 2023 - 9K bytes - Viewed (0) -
src/archive/tar/strconv_test.go
Emmanuel T Odeke <******@****.***> 1612431558 -0800
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Tue Feb 09 05:28:50 GMT 2021 - 14K bytes - Viewed (0) -
src/cmd/cgo/internal/swig/swig_test.go
// license that can be found in the LICENSE file. package swig import ( "cmd/internal/quoted" "internal/testenv" "os" "os/exec" "path/filepath" "regexp" "strconv" "strings" "sync" "testing" ) func TestStdio(t *testing.T) { testenv.MustHaveCGO(t) mustHaveSwig(t) run(t, "testdata/stdio", false) } func TestCall(t *testing.T) {
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Fri May 12 12:00:07 GMT 2023 - 3.7K bytes - Viewed (0) -
src/cmd/api/testdata/src/pkg/p1/p1.go
// Deprecated: use WError. VError = BarE() V1 = Bar1(1, 2, 3) V2 = ptwo.G() ) // Variables with conversions: var ( StrConv = string("foo") ByteConv = []byte("foo") ) var ChecksumError = ptwo.NewError("gzip checksum error") const B0 = 2 const StrConst = "foo" const FloatConst = 1.5 type myInt int type MyInt int type Time struct{} type S struct {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Dec 02 16:29:41 GMT 2022 - 3.3K bytes - Viewed (0) -
src/bytes/buffer_test.go
} } func TestWriteAppend(t *testing.T) { var got Buffer var want []byte for i := 0; i < 1000; i++ { b := got.AvailableBuffer() b = strconv.AppendInt(b, int64(i), 10) want = strconv.AppendInt(want, int64(i), 10) got.Write(b) } if !Equal(got.Bytes(), want) { t.Fatalf("Bytes() = %q, want %q", got, want) }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Apr 26 13:31:36 GMT 2024 - 18.6K bytes - Viewed (0) -
src/bufio/bufio_test.go
if rn.Intn(8) == 0 && cap(b) > 0 { b = b[1:1:cap(b)] } // Append a random integer of varying width. n := int64(rn.Intn(1 << rn.Intn(30))) want = append(strconv.AppendInt(want, n, 10), ' ') b = append(strconv.AppendInt(b, n, 10), ' ') w.Write(b) } w.Flush() if !bytes.Equal(got.Bytes(), want) { t.Errorf("output mismatch:\ngot %s\nwant %s", got.Bytes(), want) } }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Feb 10 18:56:01 GMT 2023 - 51.5K bytes - Viewed (0) -
src/cmd/asm/internal/lex/input.go
if tok != scanner.Int { in.expectText("expected line number after #line") } line, err := strconv.Atoi(in.Stack.Text()) if err != nil { in.Error("error parsing #line (cannot happen):", err) } tok = in.Stack.Next() if tok != scanner.String { in.expectText("expected file name in #line") } file, err := strconv.Unquote(in.Stack.Text()) if err != nil { in.Error("unquoting #line file name: ", err) }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Tue Aug 29 07:48:38 GMT 2023 - 12.6K bytes - Viewed (0) -
src/archive/tar/stat_unix.go
if u, ok := userMap.Load(h.Uid); ok { h.Uname = u.(string) } else if u, err := user.LookupId(strconv.Itoa(h.Uid)); err == nil { h.Uname = u.Username userMap.Store(h.Uid, h.Uname) } if g, ok := groupMap.Load(h.Gid); ok { h.Gname = g.(string) } else if g, err := user.LookupGroupId(strconv.Itoa(h.Gid)); err == nil { h.Gname = g.Name groupMap.Store(h.Gid, h.Gname) } }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Mar 15 16:01:50 GMT 2024 - 3.2K bytes - Viewed (0) -
src/bufio/example_test.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package bufio_test import ( "bufio" "bytes" "fmt" "os" "strconv" "strings" ) func ExampleWriter() { w := bufio.NewWriter(os.Stdout) fmt.Fprint(w, "Hello, ") fmt.Fprint(w, "world!") w.Flush() // Don't forget to flush! // Output: Hello, world! }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Oct 23 09:06:30 GMT 2023 - 4.9K bytes - Viewed (0) -
src/archive/tar/writer.go
// Format the sparse map. hdr.Size = 0 // Replace with encoded size spb = append(strconv.AppendInt(spb, int64(len(spd)), 10), '\n') for _, s := range spd { hdr.Size += s.Length spb = append(strconv.AppendInt(spb, s.Offset, 10), '\n') spb = append(strconv.AppendInt(spb, s.Length, 10), '\n') } pad := blockPadding(int64(len(spb))) spb = append(spb, zeroBlock[:pad]...)
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Oct 13 18:36:46 GMT 2023 - 19.6K bytes - Viewed (0)