132740b7a1
Changes to main.go: ``` - make needed changes to remove the flag package - refactor functions to use the preferred command syntax ``` changes to logger.go: ``` - make logger be quiet and stop outputting to STDOUT now that we are in user testing ``` changes to install.go: ``` - setup some extra logic in InstallPAckageSnap to install snaps in "classic confinement mode" if the user wishes ``` changes to updater_utils.go: ``` - create the file to contain some helper methods (namely one to update packages by name from a more central interface) ``` changes to cli_utils.go: ``` - create the file to contain some helper methods for the CLI (namely just a method to handle errors in the update process) ```
14 lines
286 B
Go
14 lines
286 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
func handleUpdateError(updateOption string, err error) {
|
|
if err != nil {
|
|
fmt.Printf("Error occurred during '%s' update: %v\n", updateOption, err)
|
|
} else {
|
|
fmt.Printf("Update '%s' completed successfully.\n", updateOption)
|
|
}
|
|
}
|