Skip to content

Wrapper for exec.Command for simple using and multi commands executing

License

Notifications You must be signed in to change notification settings

solar-jsoc/executor

Repository files navigation

executor

Tests Coverage Status Go Report Card PkgGoDev

Examples

package main

import (
	"fmt"

 	"github.com/solar-jsoc/executor"
)

func main() {
	stdOut, stdErr, err := executor.Exec("nmap -sV 1.1.1.1 -Pn -oX out.xml > /dev/null && cat out.xml", "", nil)
	if err != nil {
		fmt.Println(err)
		fmt.Println(stdErr)
		return
	}
	
	fmt.Println(string(stdOut))
}

About

Wrapper for exec.Command for simple using and multi commands executing

Resources

License

Stars

Watchers

Forks

Languages