Skip to content

Instantly share code, notes, and snippets.

@pauek
Created September 28, 2012 08:12
Show Gist options
  • Select an option

  • Save pauek/3798585 to your computer and use it in GitHub Desktop.

Select an option

Save pauek/3798585 to your computer and use it in GitHub Desktop.
Self-printing program in Go
package main
import "fmt"
const code = `package main
import "fmt"
const code = %s
func main() {
backquote := string([]byte{96})
fmt.Printf(code, backquote + code + backquote)
}
`
func main() {
backquote := string([]byte{96})
fmt.Printf(code, backquote + code + backquote)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment