This commit is contained in:
Fredric Silberberg 2014-09-24 22:29:00 -04:00
parent 50c84a2f7d
commit 64600ac668
3 changed files with 9 additions and 8 deletions

View File

@ -3,8 +3,8 @@ package main
import (
"flag"
"fmt"
"jsh"
"io/ioutil"
"jsh"
)
func catFiles(queue chan *jsh.JshFrame) {
@ -15,6 +15,7 @@ func catFiles(queue chan *jsh.JshFrame) {
var jshFrame jsh.JshFrame
// If there's an error, output an error frame to the queue and continue
if err != nil {
errText := make(map[string]string)
errText[fileName] = fmt.Sprintf("%s", err.Error())
@ -23,6 +24,7 @@ func catFiles(queue chan *jsh.JshFrame) {
continue
}
// Put the file contents into a frame and send them to the output
output := jsh.CatOutput{}
output.Files = []string{fileName}
output.Output = string(file)
@ -51,4 +53,3 @@ func main() {
runJsonMode()
}
}

View File

@ -2,8 +2,8 @@ package main
import (
"jsh"
"testing"
"reflect"
"testing"
)
func testUnitError(expected jsh.Unit, t *testing.T) {