I'm trying to create a simple command line calculator which takes in 3 arguments operator int1 int2 where operator is can be either +,-,*,/ whenever I add * to the arguments it adds additional arguments. How would I go about reading * from arguments.
OS: Ubuntu x64
Build Command: go build main.go
Executed with + as a command line argument
Run Command: ./main + 2 2
Output: [./main + 2 2]
Executed with * as a command line argument
Run Command: ./main * 2 2
Output: [./main build main main.go main.go.bak 2 2]
Example Code
package main
import (
"os"
"fmt"
)
func main() {
args := os.Args
fmt.Println(args)
}