Check out example codes for "user input golang". It will help you in understanding the concepts better.

Code Example 1

import (
"fmt"
"bufio"
)

//reading an integer
var age int
fmt.Println("What is your age?") // Question to the user
_, err: fmt.Scan(&age)

//reading a string
reader := bufio.newReader(os.Stdin)
var name string
fmt.Println("What is your name?") // Question to the user
name, _ := reader.readString('\n')

fmt.Println("Your name is ", name, " and you are age ", age)
}

Learn ReactJs, React Native from akashmittal.com