Posted 2020-02-27Updated 2025-10-31 Jaco Liu Goa minute read (About 162 words)Go:方法值(func value) 和 方法表达式(func expression)方法值(func value) & 方法表达式(func expression)依据函数或方法具备两大特点:1.函数本身是一种类型T;2.函数变量:函数或方法本身储存在变量中;方法值方法值的本质是调用时隐藏了接收者,和传统调用是等价的;12345678910111213141516171819202122232425262728package mainimport "fmt"type A struct { name string}func (a *A) SetValue () { fmt.Println("set")}func main() { aa := A{"Jaco"} //传统调用 aa.SetValue() //方法值,调用时隐藏接收者 vFunc := aa.SetValue vFunc() //方法表达式,调用时隐藏接收者 aFunc := (*A).SetValue //显式传递接收者,等价于aa.SetValue() aFunc(&aa)}Go:方法值(func value) 和 方法表达式(func expression)https://www.wdft.com/78f4f0b0.htmlAuthorJaco LiuPosted on2020-02-27Updated on2025-10-31Licensed under#GoGO方法值
2025-12-03Discussion and analysis of Text2SQL technology, the most difficult pain point in the commercial implementation of agents.(Agent商业落地里最难的痛点Text2SQL技术探讨和解析)AI / Agent / Text2SQL
2025-12-02Ultimate Guide to Quantizing AI Large Language Models: From FP32 to INT4, How to Make Large Models Perform at Full Speed on Consumer Devices?(AI大语言模型量化终极指南:从FP32到INT4,如何让大模型在消费级设备部署应用及选型?)AI / Agent