* Chore: Enable gocyclo linter Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * API: Fix linting issue Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * API: Refactor to reduce complexity Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * Fix type assertion Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>