Commit 88d159c6eec06775e386b18dc6bf3a3677d5cb2a

Authored by Georg Hopp
1 parent 54249555

don't use logger

Showing 1 changed file with 5 additions and 9 deletions
... ... @@ -26,14 +26,12 @@ package version
26 26
27 27 import (
28 28 "encoding/json"
29   -
30   - "gitlab.weird-web-workers.org/golang/logger"
31 29 )
32 30
33 31 type Version struct {
34   - Package string `json:"Package"`
35   - Version string `json:"Version"`
36   - Revision string `json:"Revision"`
  32 + Package string `json:"Package"`
  33 + Version string `json:"Version"`
  34 + Revision string `json:"Revision"`
37 35 BuildTime string `json:"BuildTime"`
38 36 }
39 37
... ... @@ -47,14 +45,12 @@ func (v Version) Register() {
47 45 versions[v.Package] = v
48 46 }
49 47
50   -func (vMap versionMap) Json() []byte {
  48 +func (vMap versionMap) Json() ([]byte, error) {
51 49 vSlice := make([]Version, len(vMap))
52 50 for _, v := range vMap {
53 51 vSlice = append(vSlice, v)
54 52 }
55   - vJson, err := json.Marshal(vSlice)
56   - logger.Default.FailOnError(err, "Unable to marshal versions")
57   - return vJson
  53 + return json.Marshal(vSlice)
58 54 }
59 55
60 56 // vim: ts=4 sts=4 sw=4 noet tw=72:
... ...
Please register or login to post a comment