feat: remove matrix (#7)

Reviewed-on: yw5n/yw5ncom#7
This commit is contained in:
ange 2025-07-22 18:18:32 +00:00
parent 9420df0a4c
commit 1f0c0ba4b1
9 changed files with 39 additions and 54 deletions

View file

@ -1,25 +0,0 @@
package main
import (
"log"
"os"
"strings"
)
var ALIASES map[string]string
func generateAliases() {
f, err := os.ReadFile("aliases.txt")
if err != nil {
log.Fatal(err)
}
ALIASES = make(map[string]string)
for l := range strings.SplitSeq(string(f), "\n") {
sp := strings.Fields(l)
if len(sp) == 2 {
ALIASES[sp[0]] = sp[1]
}
}
}

View file

@ -3,12 +3,31 @@ package main
import (
"bytes"
"html/template"
"log"
"os"
"path/filepath"
"regexp"
"strings"
)
var TMPL map[string][]byte
var ALIASES map[string]string
func generateAliases() {
f, err := os.ReadFile("aliases.txt")
if err != nil {
log.Fatal(err)
}
ALIASES = make(map[string]string)
for l := range strings.SplitSeq(string(f), "\n") {
sp := strings.Fields(l)
if len(sp) == 2 {
ALIASES[sp[0]] = sp[1]
}
}
}
var TMPL map[string][]byte
func generateTmpl() {
files, _ := filepath.Glob("html/*.html")
re := regexp.MustCompile("html/(.+).html")