commands: Fix embed in livereload.go

This commit is contained in:
杨晴 2022-08-01 17:42:26 +08:00 committed by GitHub
parent 5c48ba9343
commit 3fefea06b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -43,6 +43,8 @@ import (
"net/url" "net/url"
"path/filepath" "path/filepath"
_ "embed"
"github.com/gorilla/websocket" "github.com/gorilla/websocket"
) )
@ -152,7 +154,7 @@ func liveReloadJS() []byte {
var ( var (
// This is a patched version, see https://github.com/livereload/livereload-js/pull/84 // This is a patched version, see https://github.com/livereload/livereload-js/pull/84
// go:embed livereload.js //go:embed livereload.js
livereloadJS string livereloadJS string
hugoLiveReloadPlugin = fmt.Sprintf(` hugoLiveReloadPlugin = fmt.Sprintf(`
/* /*