simple demo code
- declare a interface variable
- insert data into it by scan of any method possible
package main
import (
"fmt"
)
func main() {
var s interface{}
fmt.Println("enter string")
fmt.Scan(&s)
fmt.Println(s)
}
Result now by this code
enter string
<nil>