Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for parseGOVCS (0.12 sec)

  1. src/cmd/go/internal/vcs/vcs_test.go

    }
    
    func TestGOVCS(t *testing.T) {
    	for _, tt := range govcsTests {
    		cfg, err := parseGOVCS(tt.govcs)
    		if err != nil {
    			t.Errorf("parseGOVCS(%q): %v", tt.govcs, err)
    			continue
    		}
    		private := strings.HasPrefix(tt.path, "is-private")
    		ok := cfg.allow(tt.path, private, tt.vcs)
    		if ok != tt.ok {
    			t.Errorf("parseGOVCS(%q).allow(%q, %v, %q) = %v, want %v",
    				tt.govcs, tt.path, private, tt.vcs, ok, tt.ok)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 03 15:33:59 UTC 2022
    - 17K bytes
    - Viewed (0)
  2. src/cmd/go/internal/vcs/vcs.go

    type govcsRule struct {
    	pattern string
    	allowed []string
    }
    
    // A govcsConfig is a full GOVCS configuration.
    type govcsConfig []govcsRule
    
    func parseGOVCS(s string) (govcsConfig, error) {
    	s = strings.TrimSpace(s)
    	if s == "" {
    		return nil, nil
    	}
    	var cfg govcsConfig
    	have := make(map[string]string)
    	for _, item := range strings.Split(s, ",") {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:30:18 UTC 2024
    - 46.2K bytes
    - Viewed (0)
Back to top