aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/cli/main.go2
-rw-r--r--cmd/web/index.go6
-rw-r--r--cmd/web/main.go1
3 files changed, 8 insertions, 1 deletions
diff --git a/cmd/cli/main.go b/cmd/cli/main.go
index 989592a..8bb9a24 100644
--- a/cmd/cli/main.go
+++ b/cmd/cli/main.go
@@ -9,6 +9,8 @@ import (
"riedstra.dev/mitch/steam-export/steam"
)
+var Version = "Development"
+
func parseArgs(args []string) error {
if len(args) < 2 {
return errors.New("Not enough arguments")
diff --git a/cmd/web/index.go b/cmd/web/index.go
index 2eb3695..a4a91c2 100644
--- a/cmd/web/index.go
+++ b/cmd/web/index.go
@@ -82,6 +82,9 @@ Change library path
</form>
+<h3>Version information</h3>
+<pre><code>{{.Version}}</pre></code>
+
</body>
`))
)
@@ -96,7 +99,8 @@ func index(w http.ResponseWriter, r *http.Request) {
struct {
Lib *steam.Library
Info *statusInfo
- }{Lib, status.s})
+ Version string
+ }{Lib, status.s, Version})
if err != nil {
Logger.Printf("While Rendering template: %s", err)
}
diff --git a/cmd/web/main.go b/cmd/web/main.go
index 6bf0a5d..ec0704d 100644
--- a/cmd/web/main.go
+++ b/cmd/web/main.go
@@ -15,6 +15,7 @@ import (
)
var (
+ Version = "Development"
Logger = log.New(os.Stderr, "", log.LstdFlags)
Listen = ":8899"