mirror of
https://github.com/golang/go
synced 2024-11-13 20:20:30 -07:00
20 lines
291 B
Go
20 lines
291 B
Go
|
package burnin
|
||
|
|
||
|
type sendCmdFunc func(string)
|
||
|
|
||
|
func sendCommand(c string) {}
|
||
|
|
||
|
func NewSomething() {
|
||
|
// This works...
|
||
|
// var sendCmd sendCmdFunc
|
||
|
// sendCmd = sendCommand
|
||
|
|
||
|
// So does this...
|
||
|
//sendCmd := sendCmdFunc(sendCommand)
|
||
|
|
||
|
// This fails...
|
||
|
sendCmd := sendCommand
|
||
|
|
||
|
_ = sendCmd
|
||
|
}
|