mirror of
https://github.com/willnorris/imageproxy.git
synced 2026-05-18 16:25:14 +02:00
add default VERSION string
This commit is contained in:
parent
67bf2f0675
commit
c3eda83ab5
1 changed files with 5 additions and 3 deletions
|
|
@ -29,7 +29,8 @@ import (
|
||||||
// goxc values
|
// goxc values
|
||||||
var (
|
var (
|
||||||
// VERSION is the version string for imageproxy.
|
// VERSION is the version string for imageproxy.
|
||||||
VERSION string
|
VERSION = "HEAD"
|
||||||
|
|
||||||
// BUILD_DATE is the timestamp of when imageproxy was built.
|
// BUILD_DATE is the timestamp of when imageproxy was built.
|
||||||
BUILD_DATE string
|
BUILD_DATE string
|
||||||
)
|
)
|
||||||
|
|
@ -47,8 +48,6 @@ func main() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Printf("imageproxy (version %v) listening on %s\n", VERSION, *addr)
|
|
||||||
|
|
||||||
var c httpcache.Cache
|
var c httpcache.Cache
|
||||||
if *cacheDir != "" {
|
if *cacheDir != "" {
|
||||||
c = diskcache.New(*cacheDir)
|
c = diskcache.New(*cacheDir)
|
||||||
|
|
@ -62,10 +61,13 @@ func main() {
|
||||||
if *whitelist != "" {
|
if *whitelist != "" {
|
||||||
p.Whitelist = strings.Split(*whitelist, ",")
|
p.Whitelist = strings.Split(*whitelist, ",")
|
||||||
}
|
}
|
||||||
|
|
||||||
server := &http.Server{
|
server := &http.Server{
|
||||||
Addr: *addr,
|
Addr: *addr,
|
||||||
Handler: p,
|
Handler: p,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fmt.Printf("imageproxy (version %v) listening on %s\n", VERSION, server.Addr)
|
||||||
err := server.ListenAndServe()
|
err := server.ListenAndServe()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal("ListenAndServe: ", err)
|
log.Fatal("ListenAndServe: ", err)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue