Question: I'm brand new to Go and having trouble getting fmt.scan() to fill a slice. The number of input values is dynamic and I can't use a for loop. My initial thought was to try this:

```
package main

import "fmt"

func main() {
    var x []int
    fmt.Println("Enter input")
    fmt.Scanf("%v", append(x))
    fmt.Println(x)
}

```

Which obviously doesn't work. Can someone point me in the right direction?

Answer: 
I'm new to Go, so this are my 2cents as a newbie.

```
func main(){
    var numsToInput int 

    fmt.Println("Welcome user!")
    fmt.Println("How many numbers would you like to scale today?")
    fmt.Scan(&numsToInput)

    fmt.Println("Type please the ", num, " numbers: ")

    var values []float32 // Empty slice

    for i := 0; i < num; i++{
        var val float32
        fmt.Scanln(&val)
        values = append(values, val)
    }
    fmt.Println(values)
}

```

It's not a very elaborate program, but certainly it's simple.

I hope it was useful.
Using simple packages and more logic, you could try this,

```
package main

import "fmt"

func main() {
    var ele rune
    var size int
    var sli = make([]int,0,1)
    size = cap(sli)
    for i:=0; i<=size; i++{
        if i>=len(sli){
            size=size+1
        }
        ele = 0
        fmt.Println("Enter a number to add: ")
        fmt.Scan(&ele)
        if ele==0 {
            fmt.Println("Stopping!")
            break
        }
        sli = append(sli, int(ele))
    }
    fmt.Println(sli)
}

```

The code would stop and print the slice when you enter anything other than an integer.