Q:

How to export all package API names in GO

export to api.txt file,such as
fmt.Println(params...)
net.LookupIP(params...)
...

line by line
I using this to IDE autocomplete

A:

As others have said, gocode may well do what you want already. But anyway, to list the exported API of a package you can use go tool api <pkg>. e.g.
$ go tool api runtime | grep func

pkg runtime, func Breakpoint()
pkg runtime, func CPUProfile() []byte
pkg runtime, func Caller(int) (uintptr, string, int, bool)
pkg runtime, func Callers(int, []uintptr) int
pkg runtime, func FuncForPC(uintptr) *Func
pkg runtime, func GC()
...

