Skip to content

Instantly share code, notes, and snippets.

@Jontes-Tech
Created April 8, 2022 15:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jontes-Tech/47a478a79109540a259e8833c21ea115 to your computer and use it in GitHub Desktop.
Save Jontes-Tech/47a478a79109540a259e8833c21ea115 to your computer and use it in GitHub Desktop.
Touching grass in Go!
package main
import (
"log"
"os/exec"
"fmt"
)
///
func main() {
cmd := exec.Command("touch", "grass")
err := cmd.Run()
if err != nil {
log.Fatal(err)
}
if err == nil {
fmt.Println("You did the unthinkable")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment