Skip to content

Instantly share code, notes, and snippets.

@prestonp
Created October 3, 2017 21:27
Show Gist options
  • Save prestonp/24aecfa4834a69d00f4cbd72af9d95d5 to your computer and use it in GitHub Desktop.
Save prestonp/24aecfa4834a69d00f4cbd72af9d95d5 to your computer and use it in GitHub Desktop.
go quine
go run quine.go > quine2.go
diff quine.go quine2.go
package main;import "fmt";func main(){s:="package main;import \"fmt\";func main(){s:=%q;fmt.Printf(s,s)}";fmt.Printf(s,s)}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment