Skip to content

Commit

Permalink
trunk fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
bohendo committed Mar 15, 2024
1 parent 711875a commit a686048
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion pkg/digitalocean/digitalocean.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func CheckAuth(config config.Config) error {
if err != nil {
return fmt.Errorf("Failed to authenticate with DigitalOcean API: %w", err)
}
log.Good("Successfully authenticated with DigitalOcean API")
log.Good("Successfully authenticated with DigitalOcean API")

// Check Spaces authentication
_, err = s3.ListBuckets(config)
Expand Down
32 changes: 16 additions & 16 deletions pkg/log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,35 @@ import (
)

const (
ColorReset = "\033[0m"
ColorRed = "\033[31m"
ColorGreen = "\033[32m"
ColorBlue = "\033[34m"
ColorYellow = "\033[33m"
ColorWhite = "\033[37m"
ColorReset = "\033[0m"
ColorRed = "\033[31m"
ColorGreen = "\033[32m"
ColorBlue = "\033[34m"
ColorYellow = "\033[33m"
ColorWhite = "\033[37m"
)

func Info(msg string, args ...interface{}) {
formatted := fmt.Sprintf(msg, args...)
fmt.Println(ColorWhite, formatted, ColorReset)
formatted := fmt.Sprintf(msg, args...)
fmt.Println(ColorWhite, formatted, ColorReset)
}

func Wait(msg string, args ...interface{}) {
formatted := fmt.Sprintf(msg, args...) + "..."
fmt.Println(ColorBlue, formatted, ColorReset)
formatted := fmt.Sprintf(msg, args...) + "..."
fmt.Println(ColorBlue, formatted, ColorReset)
}

func Good(msg string, args ...interface{}) {
formatted := fmt.Sprintf(msg, args...)
fmt.Println(ColorGreen, formatted, ColorReset)
formatted := fmt.Sprintf(msg, args...)
fmt.Println(ColorGreen, formatted, ColorReset)
}

func Warn(msg string, args ...interface{}) {
formatted := fmt.Sprintf(msg, args...)
fmt.Println(ColorYellow, formatted, ColorReset)
formatted := fmt.Sprintf(msg, args...)
fmt.Println(ColorYellow, formatted, ColorReset)
}

func Error(msg string, args ...interface{}) {
formatted := fmt.Sprintf(msg, args...)
fmt.Println(ColorRed, formatted, ColorReset)
formatted := fmt.Sprintf(msg, args...)
fmt.Println(ColorRed, formatted, ColorReset)
}

0 comments on commit a686048

Please sign in to comment.