mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-06 08:22:24 +01:00
fix (arm): generator issue on arm
This commit is contained in:
parent
56c5a4f385
commit
05176b8cd1
2 changed files with 12 additions and 4 deletions
|
|
@ -16,7 +16,7 @@ import (
|
|||
"github.com/gorilla/mux"
|
||||
)
|
||||
|
||||
//go:generate sh -c "go run ../generator/emacs-el.go > export_generated.go && go fmt export_generated.go"
|
||||
//go:generate go run ../generator/emacs-el.go
|
||||
var EmacsElConfig string = ""
|
||||
|
||||
func FileExport(ctx *App, res http.ResponseWriter, req *http.Request) {
|
||||
|
|
|
|||
|
|
@ -21,11 +21,19 @@ func main() {
|
|||
os.Exit(1)
|
||||
}
|
||||
|
||||
fmt.Printf(`package ctrl
|
||||
f, err = os.OpenFile("./export_generated.go", os.O_CREATE|os.O_WRONLY, os.ModePerm)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "error: %v\n", err)
|
||||
os.Exit(1)
|
||||
return
|
||||
}
|
||||
f.Write([]byte(fmt.Sprintf(`package ctrl
|
||||
|
||||
func init() {
|
||||
EmacsElConfig = `+"`"+`
|
||||
%s
|
||||
`+"`"+`
|
||||
`+"`"+`
|
||||
}
|
||||
`, j)
|
||||
`, j)))
|
||||
f.Close()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue