binary/slice.go
Function Type
has 94 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func Type(data any) (c gltf.ComponentType, t gltf.AccessorType, count uint32) {
v := reflect.ValueOf(data)
if v.Kind() != reflect.Slice {
panic(fmt.Sprintf("go3mf: binary.Type expecting a slice but got %s", v.Kind()))
}
Function MakeSliceBuffer
has 5 return statements (exceeds 4 allowed). Open
Open
func MakeSliceBuffer(c gltf.ComponentType, t gltf.AccessorType, count uint32, buffer any) any {
if buffer == nil {
return MakeSlice(c, t, count)
}
c1, t1, count1 := Type(buffer)