Created
September 3, 2021 18:39
-
-
Save khyberspache/6f7ac101530b193659266357978c1033 to your computer and use it in GitHub Desktop.
Example CallNativeAPI implementation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package commands | |
import ( | |
"encoding/json" | |
"log" | |
"os" | |
"syscall" | |
"unsafe" | |
) | |
func CallNativeAPI(task string) (string, int, int) { | |
switch task { | |
case "ps": | |
log.Print("Running Task") | |
return getProcesses() | |
} | |
return "not implemented", 1, os.Getpid() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment