- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 47 for NewDecoder (0.21 sec)
-
cmd/storage-datatypes_test.go
var buf bytes.Buffer gob.NewEncoder(&buf).Encode(v) encoded := buf.Bytes() b.Log("Size:", buf.Len(), "bytes") b.SetBytes(1) b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { dec := gob.NewDecoder(bytes.NewBuffer(encoded)) err := dec.Decode(&v) if err != nil { b.Fatal(err) } } } func BenchmarkEncodeDiskInfoMsgp(b *testing.B) { v := DiskInfo{ Total: 1000,
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Mon Sep 19 18:05:16 GMT 2022 - 9.4K bytes - Viewed (0) -
internal/config/identity/openid/providercfg.go
// respBytes, _ := httputil.DumpResponse(resp, true) // fmt.Println(string(respBytes)) return nil, errors.New(resp.Status) } claims := map[string]interface{}{} if err = json.NewDecoder(resp.Body).Decode(&claims); err != nil { // uncomment this for debugging when needed. // reqBytes, _ := httputil.DumpRequest(req, false) // fmt.Println(string(reqBytes))
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Jan 18 07:03:17 GMT 2024 - 4.6K bytes - Viewed (0) -
docs/sts/client-grants.go
if err != nil { return nil, err } defer resp.Body.Close() if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("%s", resp.Status) } var idpToken JWTToken if err = json.NewDecoder(resp.Body).Decode(&idpToken); err != nil { return nil, err } return &credentials.ClientGrantsToken{Token: idpToken.AccessToken, Expiry: idpToken.Expiry}, nil } func main() { flag.Parse()
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Aug 19 01:35:22 GMT 2021 - 3.3K bytes - Viewed (0) -
internal/event/target/elasticsearch.go
resp, err := c.Info( c.Info.WithContext(ctx), ) if err != nil { return ESSUnknown, "", store.ErrNotConnected } defer resp.Body.Close() m := make(map[string]interface{}) err = json.NewDecoder(resp.Body).Decode(&m) if err != nil { return ESSUnknown, "", fmt.Errorf("unable to get ES Server version - json parse error: %v", err) } if v, ok := m["version"].(map[string]interface{}); ok {
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Jan 18 07:03:17 GMT 2024 - 15K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/io/ByteSourceAsCharSourceReadBenchmark.java
// or we could avoid inputstreamreader and use the decoder api directly // TODO(lukes): in a real implementation we would need to handle overflow conditions int maxChars = (int) (size.get().intValue() * cs.newDecoder().maxCharsPerByte()); char[] buffer = new char[maxChars]; int bufIndex = 0; int remaining = buffer.length;
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Mon Oct 10 19:45:10 GMT 2022 - 5.2K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/io/ByteSourceAsCharSourceReadBenchmark.java
// or we could avoid inputstreamreader and use the decoder api directly // TODO(lukes): in a real implementation we would need to handle overflow conditions int maxChars = (int) (size.get().intValue() * cs.newDecoder().maxCharsPerByte()); char[] buffer = new char[maxChars]; int bufIndex = 0; int remaining = buffer.length;
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Mon Oct 10 19:45:10 GMT 2022 - 5.2K bytes - Viewed (0) -
internal/config/identity/plugin/config.go
o.serviceMetrics.accumRequestRTT(reqStartTime, float64(reqDurNanos)/1e6, true) switch resp.StatusCode { case 200: var result AuthNSuccessResponse if err = json.NewDecoder(resp.Body).Decode(&result); err != nil { return AuthNResponse{}, err } if result.MaxValiditySeconds < minValidityDurationSeconds || result.MaxValiditySeconds > maxValidityDurationSeconds {
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Apr 04 12:04:40 GMT 2024 - 13.3K bytes - Viewed (3) -
cmd/postpolicyform.go
// keys, so we need to use this technique to merge the // keys. func sanitizePolicy(r io.Reader) (io.Reader, error) { var buf bytes.Buffer e := json.NewEncoder(&buf) d := jstream.NewDecoder(r, 0).ObjectAsKVS() sset := set.NewStringSet() for mv := range d.Stream() { var kvs jstream.KVS if mv.ValueType == jstream.Object { // This is a JSON object type (that preserves key order)
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Fri Apr 19 16:45:54 GMT 2024 - 12.2K bytes - Viewed (0) -
istioctl/pkg/admin/istiodconfig.go
if err != nil { return nil, err } defer resp.Body.Close() if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("request not successful %s", resp.Status) } err = json.NewDecoder(resp.Body).Decode(&scopeInfos) if err != nil { return nil, fmt.Errorf("cannot deserialize response %s", err) } return scopeInfos, nil } func (c *ControlzClient) PutScope(scope *ScopeInfo) error {
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Sat Apr 13 05:23:38 GMT 2024 - 13.5K bytes - Viewed (0) -
internal/bucket/encryption/bucket-sse-config.go
} // ParseBucketSSEConfig - Decodes given XML to a valid default bucket encryption config func ParseBucketSSEConfig(r io.Reader) (*BucketSSEConfig, error) { var config BucketSSEConfig err := xml.NewDecoder(r).Decode(&config) if err != nil { return nil, err } // Validates server-side encryption config rules // Only one rule is allowed on AWS S3 if len(config.Rules) != 1 {
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Tue Oct 25 00:44:15 GMT 2022 - 4.9K bytes - Viewed (0)