Skip to content

Commit

Permalink
Update slice
Browse files Browse the repository at this point in the history
  • Loading branch information
khalilswdp committed Jan 21, 2022
1 parent 5102f68 commit c67a7ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions slice.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

func main() {
s := make([]int, 3)
s := make([]int, 0, 3)

for {
var userInput string
Expand All @@ -23,7 +23,7 @@ func main() {
fmt.Println("Stopping the program")
break
} else {
fmt.Println("Please type an integer or X/x to quit")
fmt.Printf("The only acceptable inputs are integers or x/X, Your input %s was not accepted\n", userInput)
continue
}
fmt.Println(userInput)
Expand Down

0 comments on commit c67a7ce

Please sign in to comment.