Familiarizing myself with Golang here and i am trying to execute shell commands, i need to chmod for any .pem file so i decided to use the wildcard *
func main() {
cmd := exec.Command( "chmod", "400", "*.pem" )
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stdout
if err := cmd.Run(); err != nil {
fmt.Println( "Error:", err )
}
I keep get this error while executing:
chmod: cannot access '*.pem': No such file or directory
Error: exit status 1