Skip to content

missionMeteora/oBandit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

oBandit GoDoc Status

oBandit is a library which will hijack your Stdout and Stderr and replace each with an output file.

Usage

package main

import (
	"fmt"
	"log"

	"github.com/missionMeteora/oBandit"
)

func main() {
	b, err := bandit.New(`output.txt`, `error.txt`)
	if err != nil {
		log.Println("There was an issue creating a new Bandit:", err)
	}

	fmt.Println("Here is some stdout")
	log.Println("Here is some stderr")

	b.Close()

	fmt.Println("Stdout back in town!")
	log.Println("Stderr back in town!")
}

About

Pipes Stdout and Stderr to files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages