Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for parseRules (0.22 sec)

  1. src/html/template/template.go

    //
    // ParseFiles returns an error if t or any associated template has already been executed.
    func (t *Template) ParseFiles(filenames ...string) (*Template, error) {
    	return parseFiles(t, readFileOS, filenames...)
    }
    
    // parseFiles is the helper for the method and function. If the argument
    // template is nil, it is created from the first file.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 21 21:00:46 UTC 2024
    - 17K bytes
    - Viewed (0)
  2. pkg/util/iptables/testing/parse.go

    // Used by ParseRule
    var boolPtrType = reflect.PointerTo(reflect.TypeOf(true))
    var ipTablesValuePtrType = reflect.TypeOf((*IPTablesValue)(nil))
    
    // ParseRule parses rule. If strict is false, it will parse the recognized
    // parameters and ignore unrecognized ones. If it is true, parsing will fail if there are
    // unrecognized parameters.
    func ParseRule(rule string, strict bool) (*Rule, error) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Dec 19 01:20:51 UTC 2023
    - 11.6K bytes
    - Viewed (0)
  3. src/text/template/multi_test.go

    	}
    	testExecute(multiExecTests, template, t)
    }
    
    func TestParseFiles(t *testing.T) {
    	_, err := ParseFiles("DOES NOT EXIST")
    	if err == nil {
    		t.Error("expected error for non-existent file; got none")
    	}
    	template := New("root")
    	_, err = template.ParseFiles("testdata/file1.tmpl", "testdata/file2.tmpl")
    	if err != nil {
    		t.Fatalf("error parsing files: %v", err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 08 10:48:29 UTC 2022
    - 11.7K bytes
    - Viewed (0)
  4. src/go/types/check_test.go

    )
    
    var (
    	haltOnError  = flag.Bool("halt", false, "halt on error")
    	verifyErrors = flag.Bool("verify", false, "verify errors (rather than list them) in TestManual")
    )
    
    var fset = token.NewFileSet()
    
    func parseFiles(t *testing.T, filenames []string, srcs [][]byte, mode parser.Mode) ([]*ast.File, []error) {
    	var files []*ast.File
    	var errlist []error
    	for i, filename := range filenames {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 19:45:33 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/types2/check_test.go

    	. "cmd/compile/internal/types2"
    )
    
    var (
    	haltOnError  = flag.Bool("halt", false, "halt on error")
    	verifyErrors = flag.Bool("verify", false, "verify errors (rather than list them) in TestManual")
    )
    
    func parseFiles(t *testing.T, filenames []string, srcs [][]byte, mode syntax.Mode) ([]*syntax.File, []error) {
    	var files []*syntax.File
    	var errlist []error
    	errh := func(err error) { errlist = append(errlist, err) }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 19:45:33 UTC 2024
    - 13.8K bytes
    - Viewed (0)
  6. pkg/util/iptables/testing/parse_test.go

    			},
    		},
    		{
    			name: "addRuleToChainRegex requires an actual rule, not just a chain name",
    			rule: `-A KUBE-NODEPORTS`,
    			err:  `(no match rules)`,
    		},
    		{
    			name: "ParseRule only parses adds",
    			rule: `-D KUBE-NODEPORTS -m comment --comment "ns2/svc2:p80 health check node port" -m tcp -p tcp --dport 30000 -j ACCEPT`,
    			err:  `(does not start with "-A CHAIN")`,
    		},
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Dec 19 01:20:51 UTC 2023
    - 26K bytes
    - Viewed (0)
  7. src/text/template/doc.go

    values, or must be copied with [Template.Clone] or [Template.AddParseTree].
    
    Parse may be called multiple times to assemble the various associated templates;
    see [ParseFiles], [ParseGlob], [Template.ParseFiles] and [Template.ParseGlob]
    for simple ways to parse related templates stored in files.
    
    A template may be executed directly or through [Template.ExecuteTemplate], which executes
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Feb 24 21:59:12 UTC 2024
    - 17.9K bytes
    - Viewed (0)
  8. pilot/pkg/xds/bench_test.go

    		return cached, k8sConfigCache[input]
    	}
    	configName := input.ConfigName
    	if configName == "" {
    		configName = input.Name
    	}
    	tmpl := template.Must(template.New("").Funcs(sprig.TxtFuncMap()).ParseFiles(path.Join("testdata", "benchmarks", configName+".yaml")))
    	var buf bytes.Buffer
    	if err := tmpl.ExecuteTemplate(&buf, configName+".yaml", input); err != nil {
    		t.Fatalf("failed to execute template: %v", err)
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Apr 22 18:13:40 UTC 2024
    - 19.7K bytes
    - Viewed (0)
Back to top