github.com/blend/go-sdk@v1.20240719.1/configutil/float64_func.go (about) 1 /* 2 3 Copyright (c) 2024 - 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 _ Float64Source = (*Float64Func)(nil) 14 ) 15 16 // Float64Func is a float value source from a commandline flag. 17 type Float64Func func(context.Context) (*float64, error) 18 19 // Float64 returns an invocation of the function. 20 func (vf Float64Func) Float64(ctx context.Context) (*float64, error) { 21 return vf(ctx) 22 }