Go fmt and add missing `toml:"hmc"` tag

pull/1/head
Jack Punter 2024-04-23 23:20:47 +01:00
parent b3fa772152
commit b59ba24b35
1 changed files with 148 additions and 148 deletions

View File

@ -44,7 +44,7 @@ type Config struct {
ApiUrl string `toml:"api_url"` ApiUrl string `toml:"api_url"`
SharedSecret string `toml:"shared_secret"` SharedSecret string `toml:"shared_secret"`
City string `toml:"city"` City string `toml:"city"`
} } `toml:"hmc"`
Postmark struct { Postmark struct {
ServerToken string `toml:"server_token"` ServerToken string `toml:"server_token"`
ApiUrl string `toml:"api_url"` ApiUrl string `toml:"api_url"`
@ -469,7 +469,7 @@ func main() {
maxIndexWidth := len(strconv.Itoa(len(subscribers))) maxIndexWidth := len(strconv.Itoa(len(subscribers)))
for index, email := range subscribers { for index, email := range subscribers {
indexStr := strconv.Itoa(index + 1) indexStr := strconv.Itoa(index + 1)
indexStr = strings.Repeat(" ", maxIndexWidth - len(indexStr)) + indexStr // Right-align the index indexStr = strings.Repeat(" ", maxIndexWidth-len(indexStr)) + indexStr // Right-align the index
fmt.Printf("%s. \033[1m%s\033[0m\n", indexStr, email) fmt.Printf("%s. \033[1m%s\033[0m\n", indexStr, email)
} }
fmt.Printf("\nMailing list grows automatically as more subscribe at \033[1mhandmadecities.com/meetups\033[0m\n") fmt.Printf("\nMailing list grows automatically as more subscribe at \033[1mhandmadecities.com/meetups\033[0m\n")