Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for findUserId (0.09 sec)

  1. src/os/user/lookup_unix_test.go

    			}
    		} else {
    			if err != nil {
    				t.Fatalf("findUserId(%s): got unexpected error %v", tt.name, err)
    			}
    			if got.Uid != tt.uid {
    				t.Errorf("findUserId(%s): got uid %v, want %s", tt.name, got.Uid, tt.uid)
    			}
    			if got.Username != tt.name {
    				t.Errorf("findUserId(%s): got name %s, want %s", tt.name, got.Username, tt.name)
    			}
    		}
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 11 04:31:34 UTC 2022
    - 7.3K bytes
    - Viewed (0)
  2. src/os/user/lookup_unix.go

    		// say: "It is expected to be a comma separated list of
    		// personal data where the first item is the full name of the
    		// user."
    		u.Name, _, _ = strings.Cut(u.Name, ",")
    		return u, nil
    	}
    }
    
    func findUserId(uid string, r io.Reader) (*User, error) {
    	i, e := strconv.Atoi(uid)
    	if e != nil {
    		return nil, errors.New("user: invalid userid " + uid)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 07 23:34:21 UTC 2023
    - 6K bytes
    - Viewed (0)
Back to top