Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for removeLeadingDuplicates (0.2 sec)

  1. src/net/http/cgi/host.go

    	if h.Stderr != nil {
    		return h.Stderr
    	}
    	return os.Stderr
    }
    
    // removeLeadingDuplicates remove leading duplicate in environments.
    // It's possible to override environment like following.
    //
    //	cgi.Handler{
    //	  ...
    //	  Env: []string{"SCRIPT_FILENAME=foo.php"},
    //	}
    func removeLeadingDuplicates(env []string) (ret []string) {
    	for i, e := range env {
    		found := false
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 07 20:46:32 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  2. src/net/http/cgi/host_test.go

    		},
    		{
    			env:  []string{"a=b", "b=c", "d", "e=f"},
    			want: []string{"a=b", "b=c", "d", "e=f"},
    		},
    	}
    	for _, tt := range tests {
    		got := removeLeadingDuplicates(tt.env)
    		if !reflect.DeepEqual(got, tt.want) {
    			t.Errorf("removeLeadingDuplicates(%q) = %q; want %q", tt.env, got, tt.want)
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 18:29:59 UTC 2024
    - 13.3K bytes
    - Viewed (0)
Back to top