|
|
@@ -8,6 +8,7 @@
|
|
|
|
|
|
```go
|
|
|
package main
|
|
|
+
|
|
|
import (
|
|
|
"bufio"
|
|
|
"fmt"
|
|
|
@@ -28,7 +29,7 @@ func main() {
|
|
|
inputReader := bufio.NewReader(inputFile)
|
|
|
for {
|
|
|
inputString, readerError := inputReader.ReadString('\n')
|
|
|
- fmt.Printf("The input was: %s", inputString)
|
|
|
+ fmt.Printf("The input was: %s", inputString)
|
|
|
if readerError == io.EOF {
|
|
|
return
|
|
|
}
|
|
|
@@ -71,7 +72,7 @@ func main() {
|
|
|
if err != nil {
|
|
|
fmt.Fprintf(os.Stderr, "File Error: %s\n", err)
|
|
|
// panic(err.Error())
|
|
|
- }
|
|
|
+ }
|
|
|
fmt.Printf("%s\n", string(buf))
|
|
|
err = ioutil.WriteFile(outputFile, buf, 0644) // oct, not hex
|
|
|
if err != nil {
|