diff options
author | Feuerfuchs <git@feuerfuchs.dev> | 2019-06-30 11:30:22 +0200 |
---|---|---|
committer | Feuerfuchs <git@feuerfuchs.dev> | 2019-06-30 11:30:22 +0200 |
commit | e29e8ba042f5923a51273fad5fc9574128b3b671 (patch) | |
tree | eecf9ba64c2b64fe3e9202152e503a670a855e21 /gopherproxy.go | |
parent | Serve assets as own files, use caching strategies (diff) | |
download | gopherproxy-e29e8ba042f5923a51273fad5fc9574128b3b671.tar.gz gopherproxy-e29e8ba042f5923a51273fad5fc9574128b3b671.tar.bz2 gopherproxy-e29e8ba042f5923a51273fad5fc9574128b3b671.zip |
Upgrade to packr v2
Diffstat (limited to 'gopherproxy.go')
-rw-r--r-- | gopherproxy.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gopherproxy.go b/gopherproxy.go index 1fcd29f..0ecfa14 100644 --- a/gopherproxy.go +++ b/gopherproxy.go | |||
@@ -18,7 +18,7 @@ import ( | |||
18 | 18 | ||
19 | "github.com/prologic/go-gopher" | 19 | "github.com/prologic/go-gopher" |
20 | 20 | ||
21 | "github.com/gobuffalo/packr" | 21 | "github.com/gobuffalo/packr/v2" |
22 | 22 | ||
23 | "github.com/davidbyttow/govips/pkg/vips" | 23 | "github.com/davidbyttow/govips/pkg/vips" |
24 | ) | 24 | ) |
@@ -260,7 +260,7 @@ func ListenAndServe(bind, robotsfile string, robotsdebug bool, uri string) error | |||
260 | } | 260 | } |
261 | } | 261 | } |
262 | 262 | ||
263 | box := packr.NewBox("./assets") | 263 | box := packr.New("assets", "./assets") |
264 | 264 | ||
265 | fontdataw, err := box.Find("iosevka-term-ss03-regular.woff") | 265 | fontdataw, err := box.Find("iosevka-term-ss03-regular.woff") |
266 | if err != nil { | 266 | if err != nil { |
@@ -329,7 +329,7 @@ func ListenAndServe(bind, robotsfile string, robotsdebug bool, uri string) error | |||
329 | } | 329 | } |
330 | 330 | ||
331 | vips.Startup(&vips.Config{ | 331 | vips.Startup(&vips.Config{ |
332 | ConcurrencyLevel: 2, | 332 | ConcurrencyLevel: 0, |
333 | }) | 333 | }) |
334 | 334 | ||
335 | http.HandleFunc("/", GopherHandler(tpl, robotsdata, AssetHashList{stylehash, jshash, fontwhash, fontw2hash}, robotsdebug, uri)) | 335 | http.HandleFunc("/", GopherHandler(tpl, robotsdata, AssetHashList{stylehash, jshash, fontwhash, fontw2hash}, robotsdebug, uri)) |