Skip to content

Instantly share code, notes, and snippets.

@khyberspache
Created September 3, 2021 18:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save khyberspache/6f7ac101530b193659266357978c1033 to your computer and use it in GitHub Desktop.
Save khyberspache/6f7ac101530b193659266357978c1033 to your computer and use it in GitHub Desktop.
Example CallNativeAPI implementation
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