diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2023-10-23 08:21:22 +0200 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2023-10-23 08:30:15 +0200 |
| commit | 67bd78f2e626602d8392482250d4328eb3b1b3a6 (patch) | |
| tree | f816ec7486b404749f0d343895bd7333490d5279 /internal | |
| parent | 3e8e89dd25fefcea14e3b7f3665fd99d401f9cb0 (diff) | |
All: Make it easier to update the version
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/http/http.go | 5 | ||||
| -rw-r--r-- | internal/version/version.go | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/internal/http/http.go b/internal/http/http.go index f3f7563..49e5f4f 100644 --- a/internal/http/http.go +++ b/internal/http/http.go @@ -12,6 +12,7 @@ import ( "time" "github.com/go-errors/errors" + "github.com/eduvpn/eduvpn-common/internal/version" ) // UserAgent is the user agent that is used for requests @@ -247,6 +248,6 @@ func (e *StatusError) Error() string { } // RegisterAgent registers the user agent for client and version -func RegisterAgent(client string, version string) { - UserAgent = fmt.Sprintf("%s/%s %s", client, version, "eduvpn-common/1.1.2") +func RegisterAgent(client string, verApp string) { + UserAgent = fmt.Sprintf("%s/%s eduvpn-common/%s", client, verApp, version.Version) } diff --git a/internal/version/version.go b/internal/version/version.go new file mode 100644 index 0000000..69f6ff0 --- /dev/null +++ b/internal/version/version.go @@ -0,0 +1,3 @@ +package version + +const Version = "1.1.2" |
