summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2019-06-14 18:45:05 -0700
committerJeff Carr <[email protected]>2019-06-14 18:45:05 -0700
commit177e6652442c18c7b6e9a32fd78c7583fdbd34d0 (patch)
tree361c7f70e3a44df475589455926eebdfb33d3392
parentd1ed400854e913b30961a2d490c00ba99dd08ca3 (diff)
debugging for Write()
Signed-off-by: Jeff Carr <[email protected]>
-rw-r--r--wget.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/wget.go b/wget.go
index 68fffdf..b1a8cd3 100644
--- a/wget.go
+++ b/wget.go
@@ -76,9 +76,13 @@ func WgetToFile(filepath string, url string) error {
// BUGS: The author's idea of friendly may differ to that of many other people.
//
func Write(filepath string, data string) bool {
+ // TODO: this isn't working for some reason and is making two '\n' chars
+ // probably because Chomp() isn't fixed yet
data = Chomp(data) + "\n"
// Create the file
- out, err := os.Create(Path(filepath))
+ ospath := Path(filepath)
+ log.Println("shell.Write() START ospath =", ospath, "filepath =", filepath)
+ out, err := os.Create(ospath)
if err != nil {
return false
}
@@ -92,5 +96,6 @@ func Write(filepath string, data string) bool {
return false
}
handleError(nil, int(count))
+ log.Println("shell.Write() END", ospath)
return true
}