func FillMainArgs(mainArgs *C.struct__cef_main_args_t, appHandle unsafe.Pointer) { var _Argv []*C.char = make([]*C.char, len(os.Args)) // On Linux appHandle is nil. log.Debug("FillMainArgs, argc=%d", len(os.Args)) for i, arg := range os.Args { _Argv[C.int(i)] = C.CString(arg) } mainArgs.argc = C.int(len(os.Args)) mainArgs.argv = &_Argv[0] }
func FillMainArgs(mainArgs *C.struct__cef_main_args_t, appHandle unsafe.Pointer) { // On Mac appHandle is nil. Logger.Println("FillMainArgs, argc=", len(os.Args)) for i, arg := range os.Args { _Argv[C.int(i)] = C.CString(arg) } mainArgs.argc = C.int(len(os.Args)) mainArgs.argv = &_Argv[0] }