github.com/weaviate/weaviate@v1.24.6/usecases/modulecomponents/arguments/nearText/fakes_for_test.go (about) 1 // _ _ 2 // __ _____ __ ___ ___ __ _| |_ ___ 3 // \ \ /\ / / _ \/ _` \ \ / / |/ _` | __/ _ \ 4 // \ V V / __/ (_| |\ V /| | (_| | || __/ 5 // \_/\_/ \___|\__,_| \_/ |_|\__,_|\__\___| 6 // 7 // Copyright © 2016 - 2024 Weaviate B.V. All rights reserved. 8 // 9 // CONTACT: hello@weaviate.io 10 // 11 12 package nearText 13 14 type fakeTransformer struct{} 15 16 func (t *fakeTransformer) Transform(in []string) ([]string, error) { 17 result := make([]string, len(in)) 18 for i, txt := range in { 19 if txt == "transform this" { 20 result[i] = "transformed text" 21 } else { 22 result[i] = txt 23 } 24 } 25 return result, nil 26 }