2018-05-27 22:40:42 +08:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"bytes"
|
2018-06-22 21:45:12 +08:00
|
|
|
"fmt"
|
2018-05-27 22:40:42 +08:00
|
|
|
"os"
|
|
|
|
)
|
|
|
|
|
|
|
|
func concat(a bytes.Buffer, b bytes.Buffer) []byte {
|
|
|
|
return append(a.Bytes(), b.Bytes()...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func exitIfError(err error) {
|
|
|
|
if err != nil {
|
2018-06-22 21:45:12 +08:00
|
|
|
fmt.Printf("fatal error: %v\n", err)
|
2018-05-27 22:40:42 +08:00
|
|
|
os.Exit(1)
|
|
|
|
}
|
|
|
|
}
|