github.com/turbot/steampipe@v1.7.0-rc.0.0.20240517123944-7cef272d4458/pkg/modinstaller/uninstall.go (about) 1 package modinstaller 2 3 import ( 4 "context" 5 6 "github.com/turbot/go-kit/helpers" 7 "github.com/turbot/steampipe/pkg/error_helpers" 8 "github.com/turbot/steampipe/pkg/utils" 9 ) 10 11 func UninstallWorkspaceDependencies(ctx context.Context, opts *InstallOpts) (*InstallData, error) { 12 utils.LogTime("cmd.UninstallWorkspaceDependencies") 13 defer func() { 14 utils.LogTime("cmd.UninstallWorkspaceDependencies end") 15 if r := recover(); r != nil { 16 error_helpers.ShowError(ctx, helpers.ToError(r)) 17 } 18 }() 19 20 // uninstall workspace dependencies 21 installer, err := NewModInstaller(ctx, opts) 22 if err != nil { 23 return nil, err 24 } 25 26 if err := installer.UninstallWorkspaceDependencies(ctx); err != nil { 27 return nil, err 28 } 29 30 return installer.installData, nil 31 32 }