Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Cmd updates the application Cmd = &cobra.Command{ Use: "update", Short: "Update application", RunE: func(cmd *cobra.Command, args []string) error { if isLatest(info.Version) { fmt.Println("Already using latest version") } else { executablePath, _ := filepath.Abs(os.Args[0]) artifactDownloadURL := fmt.Sprintf("%s/%s/nas-cli-%s-%s%s", glProjectURL, glArtifactURL, runtime.GOOS, runtime.GOARCH, glArtifactQuery) fmt.Println("Downloading latest version...") err := util.DownloadFile(executablePath, artifactDownloadURL) if err == nil { os.Chmod(executablePath, 0755) console.Success("Update successful") } return err } return nil }, } )
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.