How to print all command line arguments except the program name in Go

1 Answer

0 votes
package main
 
import (
    "fmt"
    "os"
    "strings"
)
 
func main() {
    fmt.Println(strings.Join(os.Args[1:], " "))
}
 
 
/*
run:
 
abc 123 F15
 
*/

 



answered 6 days ago by avibootz
...