Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 274 for parser (0.19 sec)

  1. internal/config/heal/heal.go

    const minimumBitrotCycleInMonths = 1
    
    func parseBitrotConfig(s string) (time.Duration, error) {
    	// Try to parse as a boolean
    	enabled, err := config.ParseBool(s)
    	if err == nil {
    		switch enabled {
    		case true:
    			return 0, nil
    		case false:
    			return -1, nil
    		}
    	}
    
    	// Try to parse as a number of months
    	if !strings.HasSuffix(s, "m") {
    		return -1, errors.New("unknown format")
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 11 01:10:30 GMT 2024
    - 4.9K bytes
    - Viewed (0)
  2. src/bufio/example_test.go

    	}
    	// Output:
    	// 1234
    	// 5678
    	// Invalid input: strconv.ParseInt: parsing "1234567901234567890": value out of range
    }
    
    // Use a Scanner with a custom split function to parse a comma-separated
    // list with an empty final value.
    func ExampleScanner_emptyFinalToken() {
    	// Comma-separated list; last entry is empty.
    	const input = "1,2,3,4,"
    	scanner := bufio.NewScanner(strings.NewReader(input))
    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)
  3. istioctl/pkg/admin/istiodconfig_test.go

    			}
    			if !reflect.DeepEqual(got, tt.want) {
    				t.Errorf("newScopeStackTraceLevelPair() got = %v, want %v", got, tt.want)
    			}
    		})
    	}
    }
    
    func Test_chooseClientFlag(t *testing.T) {
    	url, _ := url.Parse("http://localhost/scopej/resource")
    
    	ctrzClient := &ControlzClient{
    		baseURL:    url,
    		httpClient: &http.Client{},
    	}
    
    	type args struct {
    		ctrzClient      *ControlzClient
    		reset           bool
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Thu Jun 15 15:02:17 GMT 2023
    - 6.2K bytes
    - Viewed (0)
  4. istioctl/pkg/util/handlers/handlers.go

    )
    
    // InferPodInfo Uses name to infer namespace if the passed name contains namespace information.
    // Otherwise uses the namespace value passed into the function
    func InferPodInfo(name, defaultNS string) (string, string) {
    	return inferNsInfo(name, defaultNS)
    }
    
    // inferNsInfo Uses name to infer namespace if the passed name contains namespace information.
    // Otherwise uses the namespace value passed into the function
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Tue Feb 06 15:01:41 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  5. cmd/iam-etcd-store.go

    	//  a large number of policies
    	r, err := ies.client.Get(ctx, iamConfigPoliciesPrefix, etcd.WithPrefix())
    	if err != nil {
    		return err
    	}
    
    	// Parse all values to construct the policies data model.
    	for _, kvs := range r.Kvs {
    		if err = ies.getPolicyDocKV(ctx, kvs, m); err != nil && !errors.Is(err, errNoSuchPolicy) {
    			return err
    		}
    	}
    	return nil
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 13.6K bytes
    - Viewed (0)
  6. cmd/warm-backend-azure.go

    		}
    		return nil, err
    	}
    	p := azblob.NewPipeline(credential, azblob.PipelineOptions{})
    	var u *url.URL
    	if conf.Endpoint != "" {
    		u, err = url.Parse(conf.Endpoint)
    		if err != nil {
    			return nil, err
    		}
    	} else {
    		u, err = url.Parse(fmt.Sprintf("https://%s.blob.core.windows.net", conf.AccountName))
    		if err != nil {
    			return nil, err
    		}
    	}
    	serviceURL := azblob.NewServiceURL(*u, p)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Mar 05 16:44:08 GMT 2024
    - 7.8K bytes
    - Viewed (1)
  7. internal/event/arn.go

    	var s string
    	if err := d.DecodeElement(&s, &start); err != nil {
    		return err
    	}
    
    	parsedARN, err := parseARN(s)
    	if err != nil {
    		return err
    	}
    
    	*arn = *parsedARN
    	return nil
    }
    
    // parseARN - parses string to ARN.
    func parseARN(s string) (*ARN, error) {
    	// ARN must be in the format of arn:minio:sqs:<REGION>:<ID>:<TYPE>
    	if !strings.HasPrefix(s, "arn:minio:sqs:") {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 2.1K bytes
    - Viewed (0)
  8. cmd/copy-part-range.go

    		return
    	default:
    		apiErr := errorCodes.ToAPIErr(ErrInvalidCopyPartRangeSource)
    		apiErr.Description = err.Error()
    		writeErrorResponse(ctx, w, apiErr, url)
    		return
    	}
    }
    
    // Parses x-amz-copy-source-range for CopyObjectPart API. Its behavior
    // is different from regular HTTP range header. It only supports the
    // form `bytes=first-last` where first and last are zero-based byte
    // offsets. See
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Jun 18 03:27:04 GMT 2021
    - 2.5K bytes
    - Viewed (0)
  9. cni/pkg/plugin/sidecar_iptables_linux.go

    // See the License for the specific language governing permissions and
    // limitations under the License.
    
    // This is a sample chained plugin that supports multiple CNI versions. It
    // parses prevResult according to the cniVersion
    package plugin
    
    import (
    	"fmt"
    
    	"github.com/containernetworking/plugins/pkg/ns"
    
    	"istio.io/istio/pkg/log"
    	"istio.io/istio/tools/istio-iptables/pkg/cmd"
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Thu Apr 18 17:36:41 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  10. cmd/server-main_test.go

    			}
    			if !testcase.expectedErr && err != nil {
    				t.Error("expected success, got failure", err)
    			}
    			if err == nil {
    				if len(sctx.Layout.pools) != 2 {
    					t.Error("expected parsed pools to be 2, not", len(sctx.Layout.pools))
    				}
    				if sctx.Layout.pools[0].cmdline != testcase.hash {
    					t.Error("expected hash", testcase.hash, "got", sctx.Layout.pools[0].cmdline)
    				}
    			}
    		})
    	}
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Dec 07 09:33:56 GMT 2023
    - 3.1K bytes
    - Viewed (0)
Back to top