Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
var ExecutableViaArgs0 = sync.OnceValues(func() (string, error) { if os.Args[0] == "" { return "", errors.New("os.Args[0] has not been set") } executable, err := exec.LookPath(os.Args[0]) if err == nil { executable, err = filepath.Abs(executable) } if err != nil { return "", fmt.Errorf("os.Args[0] is invalid: %w", err) } return executable, nil })
ExecutableViaArgs0 returns the absolute path to the executable used to start this process. It will also append the file extension on Windows, if necessary. This function is different from os.Executable(), which will use /proc/self/exe on Linux and therefore will resolve any symlink used to locate the executable. This function will return the symlink instead because we want to be able to locate ../share/lima relative to the location of the symlink, and not the actual executable. This is important when using Homebrew.
Functions ¶
func Dir ¶
Dir returns the location of the <PREFIX>/lima/share directory, relative to the location of the current executable. It checks for multiple possible filesystem layouts and returns the first candidate that contains the native guest agent binary.
func GuestAgentBinary ¶
GuestAgentBinary returns the absolute path of the guest agent binary, possibly with ".gz" suffix.
func LibexecLima ¶
LibexecLima returns the <PREFIX>/libexec/lima directory.
Types ¶
This section is empty.