Created
December 19, 2020 20:01
-
-
Save asterite3/20e06285e096f3bad0f20630d880cae9 to your computer and use it in GitHub Desktop.
A program that prints a lot and exits after 63 seconds
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 ( | |
"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