api: minor refactor in utils.go
api: minor refactor in utils.go

scorphus/gandalf,marcelometal/gandalf,scorphus/gandalf,gleez/gandalf,gleez/gandalf,gleez/gandalf,marcelometal/gandalf,marcelometal/gandalf,tsuru/gandalf,tsuru/gandalf,flaviamissi/gandalf,flaviamissi/gandalf