22 lines
371 B
Go
22 lines
371 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"os"
|
||
|
"strings"
|
||
|
)
|
||
|
|
||
|
func stderr(format string, args ...interface{}) {
|
||
|
if !strings.HasSuffix(format, "\n") {
|
||
|
format = format + "\n"
|
||
|
}
|
||
|
fmt.Fprintf(os.Stderr, format, args...)
|
||
|
}
|
||
|
|
||
|
func stdout(format string, args ...interface{}) {
|
||
|
if !strings.HasSuffix(format, "\n") {
|
||
|
format = format + "\n"
|
||
|
}
|
||
|
fmt.Fprintf(os.Stdout, format, args...)
|
||
|
}
|