Go Add Border
func addBorder(picture []string) []string {
border := strings.Repeat("*", len(picture[0]))
result := make([]string, 0, len(picture)+2)
result = append(result, border)
for _, line := range picture {
result = append(result, "*"+line+"*")
}
result = append(result, border)
return result
}
This builds a new grid with a * border around every side. It adds a full top and bottom row, then wraps each existing row from left and right.