21 lines
307 B
Go
21 lines
307 B
Go
|
//go:build generate
|
||
|
|
||
|
package main
|
||
|
|
||
|
import (
|
||
|
"os"
|
||
|
|
||
|
"go.jolheiser.com/emdbed"
|
||
|
)
|
||
|
|
||
|
//go:generate go run readme.go
|
||
|
func main() {
|
||
|
convert, err := emdbed.ConvertFile("README.md")
|
||
|
if err != nil {
|
||
|
panic(err)
|
||
|
}
|
||
|
if err := os.WriteFile("README.md", []byte(convert), os.ModePerm); err != nil {
|
||
|
panic(err)
|
||
|
}
|
||
|
}
|