Skip to content

Just a Fake Quine for go ≥ 1.16 ​

What ​

A quine is a program that produces itself.

Go 1.16 add a new feature: embed, which makes the user can embed files into the program. Hence we can easily make a fake quine 🍺🍺🍺.

go
package main

import (
	_ "embed"
)

//go:embed main.go
var s string

func main() {
	print(s)
}

Changelog

Just observe 👀