859fa1dd070c — Sean Russell 0.9 11 years ago
Bug fix in sashay file handling; uses buffered channel for tiny performance improvement.
2 files changed, 2 insertions(+), 2 deletions(-)

M cmd/sashay/main.go
M generator.go
M cmd/sashay/main.go +1 -1
@@ 32,7 32,7 @@ func main() {
 	var b []byte
 	var e error
 	if *file != "" {
-		b, e = ioutil.ReadFile(flag.Args()[0])
+		b, e = ioutil.ReadFile(*file)
 		if e != nil {
 			fmt.Printf("error reading %s: %s\n", *file, e.Error())
 			os.Exit(1)

          
M generator.go +1 -1
@@ 101,7 101,7 @@ func generateResourceListing(baseUri str
 // close the channel when done writing. It must then wait on the returned
 // WaitGroup before exiting.
 func makeImportHandler(pack string, out chan string) (chan string, *sync.WaitGroup) {
-	outWrapper := make(chan string)
+	outWrapper := make(chan string, 10)
 	wait := &sync.WaitGroup{}
 	wait.Add(1)
 	go func() {