As stated in the title, I'm not able to properly print -e
flag valuetest@test.com
.
This is my code so far:
package main
import (
"flag"
"fmt"
)
func main() {
var email string
flag.StringVar(&email, "e", "", "email")
flag.Parse()
fmt.Println(email)
}
After running with go run test.go -e=test@test.com
I get test@test
output.
How do I get "test@test.com"?