We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
types.Int
ID
1 parent 82c901e commit 15c8ddcCopy full SHA for 15c8ddc
pkg/types/int.go
@@ -6,7 +6,9 @@ import (
6
"database/sql/driver"
7
"encoding"
8
"encoding/json"
9
+ "fmt"
10
"github.com/icinga/icingadb/internal"
11
+ "github.com/icinga/icingadb/pkg/contracts"
12
"strconv"
13
)
14
@@ -58,11 +60,16 @@ func (i *Int) UnmarshalJSON(data []byte) error {
58
60
return nil
59
61
}
62
63
+func (i Int) String() string {
64
+ return fmt.Sprintf("%d", i.Int64)
65
+}
66
+
67
// Assert interface compliance.
68
var (
69
_ json.Marshaler = Int{}
70
_ json.Unmarshaler = (*Int)(nil)
71
_ encoding.TextUnmarshaler = (*Int)(nil)
72
_ driver.Valuer = Int{}
73
_ sql.Scanner = (*Int)(nil)
74
+ _ contracts.ID = (*Int)(nil)
75
0 commit comments