Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 25 for parseRules (0.12 sec)

  1. src/internal/dag/parse.go

    	less []string
    	op   string // Either "<" or "!<"
    	def  []string
    }
    
    type syntaxError string
    
    func (e syntaxError) Error() string {
    	return string(e)
    }
    
    // parseRules parses the rules of a DAG.
    func parseRules(rules string) (out []rule, err error) {
    	defer func() {
    		e := recover()
    		switch e := e.(type) {
    		case nil:
    			return
    		case syntaxError:
    			err = e
    		default:
    			panic(e)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  2. src/text/template/helper.go

    // the last one mentioned will be the one that results.
    // For instance, ParseFiles("a/foo", "b/foo") stores "b/foo" as the template
    // named "foo", while "a/foo" is unavailable.
    func ParseFiles(filenames ...string) (*Template, error) {
    	return parseFiles(nil, readFileOS, filenames...)
    }
    
    // ParseFiles parses the named files and associates the resulting templates with
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 21:54:08 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. src/go/types/gotype.go

    	if _, nogo := err.(*build.NoGoError); err != nil && !nogo {
    		return nil, err
    	}
    
    	if *xtestFiles {
    		return parseFiles(dir, pkginfo.XTestGoFiles)
    	}
    
    	filenames := append(pkginfo.GoFiles, pkginfo.CgoFiles...)
    	if *testFiles {
    		filenames = append(filenames, pkginfo.TestGoFiles...)
    	}
    	return parseFiles(dir, filenames)
    }
    
    func getPkgFiles(args []string) ([]*ast.File, error) {
    	if len(args) == 0 {
    		// stdin
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 18 17:59:44 UTC 2022
    - 8.3K bytes
    - Viewed (0)
  6. src/html/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: Tue Sep 06 15:48:16 UTC 2022
    - 8K bytes
    - Viewed (0)
  7. src/html/template/template_test.go

    }
    
    func TestRedefineOtherParsers(t *testing.T) {
    	c := newTestCase(t)
    	c.mustParse(c.root, ``)
    	c.mustExecute(c.root, nil, ``)
    	if _, err := c.root.ParseFiles("no.template"); err == nil || !strings.Contains(err.Error(), "Execute") {
    		t.Errorf("ParseFiles: %v\nwanted error about already having Executed", err)
    	}
    	if _, err := c.root.ParseGlob("*.no.template"); err == nil || !strings.Contains(err.Error(), "Execute") {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 06 15:48:16 UTC 2022
    - 6.2K bytes
    - Viewed (0)
  8. 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)
  9. src/go/internal/srcimporter/srcimporter.go

    			p.packages[bp.ImportPath] = nil
    		}
    	}()
    
    	var filenames []string
    	filenames = append(filenames, bp.GoFiles...)
    	filenames = append(filenames, bp.CgoFiles...)
    
    	files, err := p.parseFiles(bp.Dir, filenames)
    	if err != nil {
    		return nil, err
    	}
    
    	// type-check package files
    	var firstHardErr error
    	conf := types.Config{
    		IgnoreFuncBodies: true,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 23 18:54:32 UTC 2022
    - 8.2K bytes
    - Viewed (0)
  10. cluster/gce/gci/configure_helper_test.go

    	f, err := os.Create(filepath.Join(c.kubeHome, envScriptFileName))
    	if err != nil {
    		c.t.Fatalf("Failed to create envScript: %v", err)
    	}
    	defer f.Close()
    
    	t, err := template.ParseFiles(templates...)
    	if err != nil {
    		c.t.Fatalf("Failed to parse files %q, err: %v", templates, err)
    	}
    
    	if err = t.ExecuteTemplate(f, target, env); err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Oct 30 06:23:50 UTC 2021
    - 4.8K bytes
    - Viewed (0)
Back to top