github.com/ActiveState/cli@v0.0.0-20240508170324-6801f60cd051/internal/app/app.go (about)

     1  package app
     2  
     3  type App struct {
     4  	Name    string
     5  	Exec    string
     6  	Args    []string
     7  	Dir     string
     8  	options Options
     9  }
    10  
    11  type Options struct {
    12  	IconFileName    string
    13  	IconFileSource  string
    14  	IsGUIApp        bool
    15  	MacHideDockIcon bool // macOS plist HideDockIcon
    16  }
    17  
    18  func New(name string, exec string, args []string, dir string, opts Options) (*App, error) {
    19  	return &App{
    20  		Name:    name,
    21  		Exec:    exec,
    22  		Args:    args,
    23  		Dir:     dir,
    24  		options: opts,
    25  	}, nil
    26  }
    27  
    28  func (a *App) Install() error {
    29  	return a.install()
    30  }
    31  
    32  func (a *App) Uninstall() error {
    33  	return a.uninstall()
    34  }