mirror of
https://github.com/yinggaozhen/awesome-go-cn.git
synced 2024-11-10 03:21:54 +08:00
delete files
This commit is contained in:
parent
4cf44e1943
commit
738129e921
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,3 +0,0 @@
|
|||||||
tmpl/index.html
|
|
||||||
awesome-go
|
|
||||||
.idea
|
|
30
repo.go
30
repo.go
@ -1,30 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"os"
|
|
||||||
"io/ioutil"
|
|
||||||
"text/template"
|
|
||||||
gfm "github.com/shurcooL/github_flavored_markdown"
|
|
||||||
)
|
|
||||||
|
|
||||||
type content struct {
|
|
||||||
Body string
|
|
||||||
}
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
generateHTML()
|
|
||||||
}
|
|
||||||
|
|
||||||
func generateHTML() (err error) {
|
|
||||||
// options
|
|
||||||
readmePath := "./README.md"
|
|
||||||
tplPath := "tmpl/tmpl.html"
|
|
||||||
idxPath := "tmpl/index.html"
|
|
||||||
input, _ := ioutil.ReadFile(readmePath)
|
|
||||||
body := string(gfm.Markdown(input))
|
|
||||||
c := &content{Body: body}
|
|
||||||
t := template.Must(template.ParseFiles(tplPath))
|
|
||||||
f, err := os.Create(idxPath)
|
|
||||||
t.Execute(f, c)
|
|
||||||
return
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user