Just for future reference ( this line should go way if you remove the `APIPortSlice` but you don't have to specify the type ( var portSlice APIPortSlice = APIPortSlice ) and the var keyword is not needed.

`portSlice := APIPortSlice(ports)`