13 lines
347 B
Go
13 lines
347 B
Go
//go:build windows || (linux && !android)
|
|||
|
|
|
||
|
|
package netcfg
|
||
|
|
|
||
|
|
// On Windows and Linux the package's native code is Go: NewNetcfg returns
|
||
|
|
// this.
|
||
|
|
func init() {
|
||
|
|
implementNetcfg(func() (Netcfg, error) { return goHello{}, nil })
|
||
|
|
}
|
||
|
|
|
||
|
|
type goHello struct{}
|
||
|
|
|
||
|
|
func (goHello) Hello(name string) (string, error) { return "Hello, " + name + ", from Go", nil }
|