From a79dc07e07847d81c7a928eb88606362be5e49d5 Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Sun, 20 Dec 2015 14:36:34 -0500 Subject: [PATCH] Document that int32 and int64 must be used in external types --- docs/devel/api-conventions.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/devel/api-conventions.md b/docs/devel/api-conventions.md index 1fe165a672..ab04969458 100644 --- a/docs/devel/api-conventions.md +++ b/docs/devel/api-conventions.md @@ -256,6 +256,7 @@ This rule maintains the invariant that all JSON/YAML keys are fields in API obje * Do not use unsigned integers, due to inconsistent support across languages and libraries. Just validate that the integer is non-negative if that's the case. * Do not use enums. Use aliases for string instead (e.g., `NodeConditionType`). * Look at similar fields in the API (e.g., ports, durations) and follow the conventions of existing fields. +* All public integer fields MUST use the Go `(u)int32` or Go `(u)int64` types, not `(u)int` (which is ambiguous depending on target platform). Internal types may use `(u)int`. #### Constants