func doInit(license string, appName string, language string, languageVersion string) (int, error) {
	clicense := C.CString(license)
	defer C.free(unsafe.Pointer(clicense))
	cappName := C.CString(appName)
	defer C.free(unsafe.Pointer(cappName))
	clang := C.CString("Go")
	defer C.free(unsafe.Pointer(clang))
	clangVersion := C.CString(runtime.Version())
	defer C.free(unsafe.Pointer(clangVersion))
	errno := C.newrelic_init(clicense, cappName, clang, clangVersion)
	return errNo(errno)
}
Start the CollectorClient and the harvester thread that sends application
performance data to New Relic once a minute.

@param license  New Relic account license key
@param app_name  name of instrumented application
@param language  name of application programming language
@param language_version  application programming language version
@return  segment id on success, error code on error, else warning code
package sdk
import "C"
import (
	"errors"
	"fmt"
	"path/filepath"
	"runtime"
	"unsafe"
)
var errNoMap = map[int]string{
	-0x10001: "other",
	-0x20001: "disabled",
	-0x30001: "invalid param",
	-0x30002: "invalid id",
	-0x40001: "transaction not started",
	-0x40002: "transaction in progress",
	-0x40003: "transaction not named",
}
func errNo(i C.int) (int, error) {
	errno := int(i)
	if errno < 0 {
		errMsg := "unknown"
		if e, ok := errNoMap[errno]; ok {
			errMsg = e
		}
		return errno, errors.New(fmt.Sprintf("newrelic[%s]: %s", caller(), errMsg))
	}
	return errno, nil
}
func errNoLong(i C.long) (int64, error) {
	_, err := errNo(C.int(i))
	return int64(i), err
}
func caller() string {
	name := "unknown"
	if pc, _, _, ok := runtime.Caller(1); ok {
		name = filepath.Base(runtime.FuncForPC(pc).Name())
	}
	return name
}
func InitEmbeddedMode(license string, appName string) (int, error) {
	C.newrelic_register_message_handler((*[0]byte)(C.newrelic_message_handler))
	return doInit(license, appName, "Go", runtime.Version())
}