diff options
| author | codecrafters-bot <hello@codecrafters.io> | 2024-06-02 20:04:15 +0000 |
|---|---|---|
| committer | codecrafters-bot <hello@codecrafters.io> | 2024-06-02 20:04:15 +0000 |
| commit | bab5e32bd62071304ec1cd865859e685bf6d9b23 (patch) | |
| tree | cb07d921130962c3887f3570ed70e45553879f83 /app | |
| download | docker-go-bab5e32bd62071304ec1cd865859e685bf6d9b23.tar.gz docker-go-bab5e32bd62071304ec1cd865859e685bf6d9b23.zip | |
init [skip ci]
Diffstat (limited to 'app')
| -rw-r--r-- | app/main.go | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/app/main.go b/app/main.go new file mode 100644 index 0000000..d1c4195 --- /dev/null +++ b/app/main.go @@ -0,0 +1,28 @@ +package main + +import ( + "fmt" + // Uncomment this block to pass the first stage! + // "os" + // "os/exec" +) + +// Usage: your_docker.sh run <image> <command> <arg1> <arg2> ... +func main() { + // You can use print statements as follows for debugging, they'll be visible when running tests. + fmt.Println("Logs from your program will appear here!") + + // Uncomment this block to pass the first stage! + // + // command := os.Args[3] + // args := os.Args[4:len(os.Args)] + // + // cmd := exec.Command(command, args...) + // output, err := cmd.Output() + // if err != nil { + // fmt.Printf("Err: %v", err) + // os.Exit(1) + // } + // + // fmt.Println(string(output)) +} |