diff --git a/config.go b/config.go
index 40238a4..8d3b0a9 100644
--- a/config.go
+++ b/config.go
@@ -1,6 +1,7 @@
package pypihub
import (
+ "fmt"
"os"
"strings"
@@ -14,6 +15,10 @@ type Config struct {
Bind string `arg:"-b,--bind,env:PYPIHUB_BIND,help:[
]: to bind the server to (default: ':8287') (env: PYPIHUB_BIND)"`
}
+func (c Config) Version() string {
+ return fmt.Sprintf("pypihub %s", VERSION)
+}
+
func ParseConfig() Config {
var config = Config{
Bind: ":8287",
diff --git a/version.go b/version.go
new file mode 100644
index 0000000..0af7bcc
--- /dev/null
+++ b/version.go
@@ -0,0 +1,3 @@
+package pypihub
+
+const VERSION = "0.1.0"