Skip to content

Instantly share code, notes, and snippets.

@asterite3
Created December 19, 2020 20:01
Show Gist options
  • Save asterite3/20e06285e096f3bad0f20630d880cae9 to your computer and use it in GitHub Desktop.
Save asterite3/20e06285e096f3bad0f20630d880cae9 to your computer and use it in GitHub Desktop.
A program that prints a lot and exits after 63 seconds
package main
import (
"io"
"time"
"os"
)
const a = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\n"
func main() {
go func() {
time.Sleep(63 * time.Second)
os.Exit(0)
}()
for {
_, err := io.WriteString(os.Stdout, a)
if err != nil {
panic(err)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment