"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "go/pkg/diag/diag.go" between
Netspoc-6.025.tar.gz and Netspoc-6.026.tar.gz

About: NetSPoC is a network security policy compiler (using its own description language) to manage all the packet filter devices inside your network topology.

diag.go  (Netspoc-6.025):diag.go  (Netspoc-6.026)
package diag package diag
import ( import (
"fmt" "fmt"
"github.com/hknutzen/Netspoc/go/pkg/conf"
"os" "os"
"time"
) )
func Info(format string, args ...interface{}) { func Err(format string, args ...interface{}) {
if conf.Conf.Verbose { fmt.Fprintf(os.Stderr, "Error: "+format+"\n", args...)
string := fmt.Sprintf(format, args...) }
fmt.Fprintln(os.Stderr, string)
} func Warn(format string, args ...interface{}) {
fmt.Fprintf(os.Stderr, "Warning: "+format+"\n", args...)
} }
func Msg(msg string) { func Msg(msg string) {
if os.Getenv("SHOW_DIAG") != "" { if os.Getenv("SHOW_DIAG") != "" {
fmt.Fprintln(os.Stderr, "DIAG: "+msg) fmt.Fprintln(os.Stderr, "DIAG: "+msg)
} }
} }
func Progress(msg string) {
if conf.Conf.Verbose {
if conf.Conf.TimeStamps {
msg = fmt.Sprintf("%.0fs %s", time.Since(conf.StartTime).
Seconds(), msg)
}
Info(msg)
}
}
 End of changes. 4 change blocks. 
7 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)