From b796d548159e3fc7e64a5431b4b14471018958a5 Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Wed, 28 Aug 2024 00:48:10 +0900 Subject: [PATCH] Remove unused code in articlegen --- tool/articlegen/main.go | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/tool/articlegen/main.go b/tool/articlegen/main.go index 4a87ae167..10fc7491c 100644 --- a/tool/articlegen/main.go +++ b/tool/articlegen/main.go @@ -7,7 +7,6 @@ import ( "flag" "fmt" "io" - "io/ioutil" "os" "strconv" "strings" @@ -58,14 +57,6 @@ func main() { fmt.Printf("%s\n", w.String()) } -func mustReadAll(r io.Reader) []byte { - buf, err := ioutil.ReadAll(r) - if err != nil { - panic(err) - } - return buf -} - func extractTitleFromBody(body string) string { scanner := bufio.NewScanner(strings.NewReader(body)) if scanner.Scan() { @@ -133,13 +124,3 @@ categories: [{{.Categories}}] return t.Execute(w, data) } - -var annotations = []string{"[draft]", "[deleted]"} - -func trimAnnotations(s string) string { - ret := s - for _, a := range annotations { - ret = strings.ReplaceAll(s, a, "") - } - return ret -}