mirror of
https://github.com/fumiama/gozel.git
synced 2026-06-12 20:40:32 +08:00
feat(ze): add event support & vadd demo & refactor (#5)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
package main
|
||||
|
||||
import "os"
|
||||
import (
|
||||
"os"
|
||||
"path"
|
||||
)
|
||||
|
||||
var apif *os.File
|
||||
|
||||
func init() {
|
||||
f, err := os.Create("api.go")
|
||||
f, err := os.Create(path.Join("gozel", "api.go"))
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"path"
|
||||
"strconv"
|
||||
"strings"
|
||||
"unicode"
|
||||
@@ -134,7 +135,7 @@ func scanHeader(name string, scan *bufio.Scanner) {
|
||||
}
|
||||
fmt.Println(infh(name), "scanning region", region)
|
||||
k := fmt.Sprint(name, "_", region)
|
||||
f, err := os.Create(fmt.Sprint(k, ".go"))
|
||||
f, err := os.Create(path.Join("gozel", fmt.Sprint(k, ".go")))
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("%s L%d: cannot create region %s, err: %v", name, ln, region, err))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user