-
Notifications
You must be signed in to change notification settings - Fork 1
/
version.go
29 lines (26 loc) · 2.76 KB
/
version.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package main
import (
"fmt"
"net/http"
"runtime/debug"
)
var version = ""
var builddate = ""
func banner(w http.ResponseWriter) {
if version == "" {
if build, ok := debug.ReadBuildInfo(); ok {
version = build.Main.Version
}
}
fmt.Fprintf(w, " █████ ███ ███ \n")
fmt.Fprintf(w, " ░░███ ░░░ ░░░ \n")
fmt.Fprintf(w, " ░███ █████ ██████ ██████ █████████████ ██████ █████ ████ █████ ██████ ████████ █████ █████\n")
fmt.Fprintf(w, " ░███░░███ ░░░░░███ ███░░███░░███░░███░░███ ███░░███ ░░███ ░░███ ███░░ ███░░███░░███░░███░░███ ░░███ \n")
fmt.Fprintf(w, " ░██████░ ███████ ░███ ░███ ░███ ░███ ░███ ░███ ░███ ░███ ░███ ░░█████ ░███████ ░███ ░░░ ░███ ░███ \n")
fmt.Fprintf(w, " ░███░░███ ███░░███ ░███ ░███ ░███ ░███ ░███ ░███ ░███ ░███ ░███ ░░░░███░███░░░ ░███ ░░███ ███ \n")
fmt.Fprintf(w, " ████ █████░░████████░░██████ █████░███ █████░░██████ ░███ █████ ██████ ░░██████ █████ ░░█████ \n")
fmt.Fprintf(w, " ░░░░ ░░░░░ ░░░░░░░░ ░░░░░░ ░░░░░ ░░░ ░░░░░ ░░░░░░ ░███ ░░░░░ ░░░░░░ ░░░░░░ ░░░░░ ░░░░░ \n")
fmt.Fprintf(w, " ███ ░███ \n")
fmt.Fprintf(w, " ░░██████ %s (%s)\n", version, builddate)
fmt.Fprintf(w, " ░░░░░░ \n")
}