- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for AppendFormat (0.59 sec)
-
staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/time.go
return []byte("null"), nil } buf := make([]byte, 0, len(time.RFC3339)+2) buf = append(buf, '"') // time cannot contain non escapable JSON characters buf = t.UTC().AppendFormat(buf, time.RFC3339) buf = append(buf, '"') return buf, nil } func (t Time) MarshalCBOR() ([]byte, error) { if t.IsZero() { return cbor.Marshal(nil) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 29 21:48:09 UTC 2024 - 5.2K bytes - Viewed (0) -
src/time/export_test.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Oct 24 19:23:32 UTC 2022 - 4K bytes - Viewed (0) -
src/go/internal/gccgoimporter/testdata/issue29198.gox
func (t <esc:0x12> <type 12>) Truncate (d <type 26>) <type 12>; func (t <esc:0x1> <type 12>) MarshalJSON () (? <type 30 [] <type -20>>, ? <type -19>); func (t <esc:0x1> <type 12>) AppendFormat (b <esc:0x12> <type 31 [] <type -20>>, layout <esc:0x1> <type -16>) <type 32 [] <type -20>>; func (t <esc:0x1> <type 28>) GobDecode (data <esc:0x1> <type 33 [] <type -20>>) <type -19>;
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Dec 12 23:01:16 UTC 2018 - 6.4K bytes - Viewed (0) -
src/log/slog/json_handler.go
// RFC 3339 is clear that years are 4 digits exactly. // See golang.org/issue/4556#c15 for more discussion. s.appendError(errors.New("time.Time year outside of range [0,9999]")) } s.buf.WriteByte('"') *s.buf = t.AppendFormat(*s.buf, time.RFC3339Nano) s.buf.WriteByte('"') } func appendJSONValue(s *handleState, v Value) error { switch v.Kind() { case KindString: s.appendString(v.str()) case KindInt64:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 17 16:18:11 UTC 2023 - 8.1K bytes - Viewed (0) -
src/go/internal/gccgoimporter/testdata/time.gox
>>; }> func (t <type 3>) String () <type -16>; func (t <type 3>) Format (layout <type -16>) <type -16>; func (t <type 3>) AppendFormat (b <type 16 [] <type -20>>, layout <type -16>) <type 17 [] <type -20>>; func (t <type 3>) After (u <type 3>) <type -15>; func (t <type 3>) Before (u <type 3>) <type -15>; func (t <type 3>) Equal (u <type 3>) <type -15>;
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Sep 30 21:33:51 UTC 2021 - 7.3K bytes - Viewed (0) -
src/time/format.go
if max < bufSize { var buf [bufSize]byte b = buf[:0] } else { b = make([]byte, 0, max) } b = t.AppendFormat(b, layout) return string(b) } // AppendFormat is like [Time.Format] but appends the textual // representation to b and returns the extended buffer. func (t Time) AppendFormat(b []byte, layout string) []byte { // Optimize for RFC3339 as it accounts for over half of all representations. switch layout {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 11 17:09:28 UTC 2024 - 49.3K bytes - Viewed (0) -
src/net/http/cookie.go
} } var buf [len(TimeFormat)]byte if validCookieExpires(c.Expires) { b.WriteString("; Expires=") b.Write(c.Expires.UTC().AppendFormat(buf[:0], TimeFormat)) } if c.MaxAge > 0 { b.WriteString("; Max-Age=") b.Write(strconv.AppendInt(buf[:0], int64(c.MaxAge), 10)) } else if c.MaxAge < 0 { b.WriteString("; Max-Age=0") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 18:33:05 UTC 2024 - 13.9K bytes - Viewed (0) -
src/database/sql/convert_test.go
{s: uint64(123), d: &scanraw, wantraw: RawBytes("123")}, {s: 1.5, d: &scanraw, wantraw: RawBytes("1.5")}, // time.Time has been placed here to check that the RawBytes slice gets // correctly reset when calling time.Time.AppendFormat. {s: time.Unix(2, 5).UTC(), d: &scanraw, wantraw: RawBytes("1970-01-01T00:00:02.000000005Z")}, // Strings to integers {s: "255", d: &scanuint8, wantuint: 255},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 10 20:23:22 UTC 2024 - 17K bytes - Viewed (0) -
src/database/sql/convert.go
if d == nil { return errNilPtr } *d = []byte(s.Format(time.RFC3339Nano)) return nil case *RawBytes: if d == nil { return errNilPtr } *d = rows.setrawbuf(s.AppendFormat(rows.rawbuf(), time.RFC3339Nano)) return nil } case decimalDecompose: switch d := dest.(type) { case decimalCompose: return d.Compose(s.Decompose(nil)) } case nil:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 17:58:53 UTC 2024 - 16.2K bytes - Viewed (0) -
src/log/slog/handler.go
// to guarantee that there are exactly 4 digits after the period. const prefixLen = len("2006-01-02T15:04:05.000") n := len(b) t = t.Truncate(time.Millisecond).Add(time.Millisecond / 10) b = t.AppendFormat(b, time.RFC3339Nano) b = append(b[:n+prefixLen], b[n+prefixLen+1:]...) // drop the 4th digit return b
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Dec 05 18:18:13 UTC 2023 - 17.5K bytes - Viewed (0)