bytedance / gopkg

Universal Utilities for Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gopool中的f func()能否新增可入参的 func()类型?

CC-Cheunggg opened this issue · comments

Summary

gopool中的f func()能否新增可入参的 func()类型?

Motivation

形参的使用场景,还是比较多的

Explanation

No response

@RPCheung 可以自己封装:

func(args interface{}) func() {
    return func() { println(args) }
}

明白了