Created
April 8, 2022 15:35
-
-
Save Jontes-Tech/47a478a79109540a259e8833c21ea115 to your computer and use it in GitHub Desktop.
Touching grass in Go!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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