github.com/blend/go-sdk@v1.20220411.3/configutil/int_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 _ IntSource = (*IntFunc)(nil) 14 ) 15 16 // IntFunc is an int value source from a commandline flag. 17 type IntFunc func(context.Context) (*int, error) 18 19 // Int returns an invocation of the function. 20 func (vf IntFunc) Int(ctx context.Context) (*int, error) { 21 return vf(ctx) 22 }