go: remove recursion from main encode() when passed a reflect.Interface