Skip to content

Instantly share code, notes, and snippets.

@ebfe
Created July 17, 2012 15:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ebfe/3130119 to your computer and use it in GitHub Desktop.
Save ebfe/3130119 to your computer and use it in GitHub Desktop.
Go quine
package main
import "fmt"
func main() {
s := "\tfmt.Printf(\"package main\\nimport \\\"fmt\\\"\\nfunc main() {\\n\\ts := %q\\n%s\\n}\\n\", s, s)"
fmt.Printf("package main\nimport \"fmt\"\nfunc main() {\n\ts := %q\n%s\n}\n", s, s)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment