github.com/blend/go-sdk@v1.20220411.3/configutil/strings_func.go (about) 1 /* 2 3 Copyright (c) 2022 - Present. Blend Labs, Inc. All rights reserved 4 Use of this source code is governed by a MIT license that can be found in the LICENSE file. 5 6 */ 7 8 package configutil 9 10 import "context" 11 12 var ( 13 _ StringsSource = (*StringsFunc)(nil) 14 ) 15 16 // StringsFunc is a value source from a function. 17 type StringsFunc func(context.Context) ([]string, error) 18 19 // Strings returns an invocation of the function. 20 func (svf StringsFunc) Strings(ctx context.Context) ([]string, error) { 21 return svf(ctx) 22 }