You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `int` datatype is not guaranteed to offer 64 bits of precision. On
32-bit platforms it only has 32 bits of precision. This is incompatible
with the Hetzner Cloud identifiers having up to 52-bits after September
1st 2023.
See #263 for more details about this change.
-`v1` is supported until September 1st 2023 and will continue to receive new features until then. See [#263](https://github.com/hetznercloud/hcloud-go/issues/263).
45
+
46
+
### From v1 to v2
47
+
48
+
Version 2.0.0 was published because we changed the datatype of all `ID` fields from `int` to `int64`.
49
+
50
+
To migrate to the new version, replace all your imports to reference the new module path:
When you compile your code, it will show any invalid usages of `int` in your code that you need to fix. We commonly found these changes while updating our integrations:
60
+
61
+
-`strconv.Atoi(idString)` (parsing integers) needs to be replaced by `strconv.ParseInt(idString, 10, 64)`
62
+
-`strconv.Itoa(id)` (formatting integers) needs to be replaced by `strconv.FormatInt(id, 10)`
63
+
39
64
## Go Version Support
40
65
41
66
The library supports the latest two Go minor versions, e.g. at the time Go 1.19 is released, it supports Go 1.18 and 1.19.
0 commit comments