Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 21 for lookupCmd (0.26 sec)

  1. src/cmd/go/main.go

    	invoke(cmd, args[used-1:])
    	base.Exit()
    }
    
    // lookupCmd interprets the initial elements of args
    // to find a command to run (cmd.Runnable() == true)
    // or else a command group that ran out of arguments
    // or had an unknown subcommand (len(cmd.Commands) > 0).
    // It returns that command and the number of elements of args
    // that it took to arrive at that command.
    func lookupCmd(args []string) (cmd *base.Command, used int) {
    	cmd = base.Go
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:09:11 UTC 2024
    - 10K bytes
    - Viewed (0)
  2. src/os/user/lookup.go

    	if u, err := Current(); err == nil && u.Username == username {
    		return u, err
    	}
    	return lookupUser(username)
    }
    
    // LookupId looks up a user by userid. If the user cannot be found, the
    // returned error is of type [UnknownUserIdError].
    func LookupId(uid string) (*User, error) {
    	if u, err := Current(); err == nil && u.Uid == uid {
    		return u, err
    	}
    	return lookupUserId(uid)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:33:12 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  3. src/os/user/lookup_android.go

    package user
    
    import "errors"
    
    func lookupUser(string) (*User, error) {
    	return nil, errors.New("user: Lookup not implemented on android")
    }
    
    func lookupUserId(string) (*User, error) {
    	return nil, errors.New("user: LookupId not implemented on android")
    }
    
    func lookupGroup(string) (*Group, error) {
    	return nil, errors.New("user: LookupGroup not implemented on android")
    }
    
    func lookupGroupId(string) (*Group, error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 18:17:57 UTC 2021
    - 676 bytes
    - Viewed (0)
  4. src/os/user/user_test.go

    	want, err := Current()
    	if err != nil {
    		if hasCgo || (hasUSER && hasHOME) {
    			t.Fatalf("Current: %v", err)
    		} else {
    			t.Skipf("skipping: %v", err)
    		}
    	}
    
    	got, err := LookupId(want.Uid)
    	if err != nil {
    		t.Fatalf("LookupId: %v", err)
    	}
    	compare(t, want, got)
    }
    
    func checkGroup(t *testing.T) {
    	t.Helper()
    	if !groupImplemented {
    		t.Skip("user: group not implemented; skipping test")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 21 15:59:43 UTC 2023
    - 4K bytes
    - Viewed (0)
  5. src/os/user/lookup_plan9.go

    // license that can be found in the LICENSE file.
    
    package user
    
    import (
    	"fmt"
    	"os"
    	"syscall"
    )
    
    // Partial os/user support on Plan 9.
    // Supports Current(), but not Lookup()/LookupId().
    // The latter two would require parsing /adm/users.
    
    func init() {
    	userImplemented = false
    	groupImplemented = false
    	groupListImplemented = false
    }
    
    var (
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Dec 07 16:09:09 UTC 2022
    - 1.3K bytes
    - Viewed (0)
  6. src/net/lookup_test.go

    				_, err := LookupHost(testNODATA)
    				return err
    			},
    		},
    		{
    			name: "LookupMX NXDOMAIN",
    			query: func() error {
    				_, err := LookupMX(testNXDOMAIN)
    				return err
    			},
    		},
    		{
    			name: "LookupMX NODATA",
    			query: func() error {
    				_, err := LookupMX(testNODATA)
    				return err
    			},
    		},
    		{
    			name: "LookupNS NXDOMAIN",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 41.4K bytes
    - Viewed (0)
  7. src/net/lookup.go

    // [Resolver.LookupMX].
    func LookupMX(name string) ([]*MX, error) {
    	return DefaultResolver.LookupMX(context.Background(), name)
    }
    
    // LookupMX returns the DNS MX records for the given domain name sorted by preference.
    //
    // The returned mail server names are validated to be properly
    // formatted presentation-format domain names. If the response contains
    // invalid names, those records are filtered out and an error
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Apr 14 18:23:45 UTC 2024
    - 28.6K bytes
    - Viewed (0)
  8. src/os/user/lookup_windows.go

    		return "", e
    	}
    	return dir, nil
    }
    
    // lookupGroupName accepts the name of a group and retrieves the group SID.
    func lookupGroupName(groupname string) (string, error) {
    	sid, _, t, e := syscall.LookupSID("", groupname)
    	if e != nil {
    		return "", e
    	}
    	// https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-samr/7b2aeb27-92fc-41f6-8437-deb65d950921#gt_0387e636-5654-4910-9519-1f8326cf5ec0
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 12 16:42:41 UTC 2023
    - 11.8K bytes
    - Viewed (0)
  9. src/syscall/security_windows.go

    	if e != nil {
    		return nil, e
    	}
    	defer LocalFree((Handle)(unsafe.Pointer(sid)))
    	return sid.Copy()
    }
    
    // LookupSID retrieves a security identifier sid for the account
    // and the name of the domain on which the account was found.
    // System specify target computer to search.
    func LookupSID(system, account string) (sid *SID, domain string, accType uint32, err error) {
    	if len(account) == 0 {
    		return nil, "", 0, EINVAL
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 12 16:42:41 UTC 2023
    - 10K bytes
    - Viewed (0)
  10. src/os/user/user.go

    //
    // On POSIX systems Gid contains a decimal number representing the group ID.
    type Group struct {
    	Gid  string // group ID
    	Name string // group name
    }
    
    // UnknownUserIdError is returned by [LookupId] when a user cannot be found.
    type UnknownUserIdError int
    
    func (e UnknownUserIdError) Error() string {
    	return "user: unknown userid " + strconv.Itoa(int(e))
    }
    
    // UnknownUserError is returned by [Lookup] when
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:33:12 UTC 2024
    - 2.9K bytes
    - Viewed (0)
Back to top