try this :
package main
import (
"fmt"
"math/rand"
)
func main() {
target := rand.Intn(100) + 1
fmt.Println(target)
}
or this
package main
import (
"fmt"
"math/rand"
)
func main() {
target := rand.Intn(100)
fmt.Println(target + 1)
}
again you're not adding one in either case , while i suggested to only add it in one of the lines .