Hi in running my simple OS.Args program its also outputting a weird file path with the output and I dont want that.
Here is my program:
import (
"fmt"
"os"
)
type candidate struct {
name string
votes int
}
func main() {
num_args := len(os.Args)
if num_args < 2 {
fmt.Println("Please enter more candidates")
}
const max = 9
var candidate_count int
candidate_count = num_args
if candidate_count > max {
fmt.Println("Maximum number of candidates is %i\n", max)
}
var candidates = new(candidate)
for i := 0; i < len(os.Args); i++ {
candidates.name = os.Args[i]
fmt.Println(candidates.name)
}
}```
Here is my output with the input:
```jason@Jasons-MacBook-Air-2 GoLangProgForPularity % go run plurality.go jason sarah
/var/folders/3y/j5mlhwm52s9czwl1bt5c_4140000gn/T/go-build320798206/b001/exe/plurality
jason
sarah