also found this so it is a known limitation:
https://github.com/golang/go/issues/44350

On Tuesday, July 26, 2022 at 10:39:06 AM UTC-4 gocss wrote:

> Appears 'go vet -printf.funcs loopErrMsgf'
> does not detect incorrect verbs or lack thereof on anonymous functions ... 
> :(
> as shown above, which is my desired use case.
>
> On Tuesday, July 26, 2022 at 10:02:19 AM UTC-4 gocss wrote:
>
>> Is there a way to configure 'go vet' to a variant of sprintf/printf that 
>> I rolled
>>
>> such
>>
>> loopErrMsgf := func(format string, params ...interface{}) string {
>>              errCnt++
>>              return fmt.Sprintf("[checkIn:loopCnt:%d, errCnt:%d] error 
>> %s", loopCnt, errCnt, fmt.Sprintf(format, params...))
>>          }   
>>
>> that will flag if params does not include correct corresponding printf 
>> verbs that are
>> passed in 'format' ??? above?
>>
>> If not 'go vet" I used but yet to remember tool I have done this with in 
>> the past,
>> is there another way to do such checks?
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/38d46d0c-ee7e-45b1-a0c5-02070231ef05n%40googlegroups.com.

Reply via email to