1
0
mirror of https://github.com/mainflux/mainflux.git synced 2025-04-27 13:48:49 +08:00
Mainflux.mainflux/version.go
anovakovic01 250505700b Fix normalizer output queue (#184)
Fix normalizer output queue by changing subject to normalized.
Version updated from 0.1.0 to 0.1.1.

Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
2018-03-15 14:23:20 +01:00

24 lines
399 B
Go

package mainflux
import (
"encoding/json"
"net/http"
)
const version string = "0.1.1"
type response struct {
Version string
}
// Version exposes an HTTP handler for retrieving service version.
func Version() http.HandlerFunc {
return http.HandlerFunc(func(rw http.ResponseWriter, _ *http.Request) {
res := response{Version: version}
data, _ := json.Marshal(res)
rw.Write(data)
})
}