From da8f1fdd87b0118b1c8011fc061cbd75763259a0 Mon Sep 17 00:00:00 2001 From: Marty Sluijtman Date: Wed, 7 Sep 2022 16:04:41 +0200 Subject: [PATCH] Looked up how to properly format strings at long last --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 6b58b8b..27b4b45 100644 --- a/main.go +++ b/main.go @@ -281,7 +281,7 @@ func printStatList(verbose bool) { proficiency = "Not proficient" } score := char.Stats[i].Score - fmt.Printf("Stat: %s\t%s\tStat score: %d\tStat modifier: %d\n", name, proficiency, score, getModifier(char.Stats[i])) + fmt.Printf("Stat: %13s\t%s\tStat score: %2d\tStat modifier: %2d\n", name, proficiency, score, getModifier(char.Stats[i])) } } else { for i := 0; i < len(char.Stats); i++ { @@ -310,7 +310,7 @@ func printSkillList(verbose bool) { } else { expertise = "Doesn't have expertise" } - fmt.Printf("Skill: %s\tSkill modifier: %d\t%s\t%s\n", name, localModifier, proficiency, expertise) + fmt.Printf("Skill:%16s\tSkill modifier:%3d\t%s\t%s\n", name, localModifier, proficiency, expertise) } } else { for i := 0; i < len(char.Skills); i++ {