From 5e4ff8771637d9922811c201512e504f3b269ad8 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Mon, 6 Apr 2015 10:20:41 +0900 Subject: [PATCH] Updating documentation, swapping source and destination fields for links --- homemaker.go | 2 +- link.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/homemaker.go b/homemaker.go index 13e61e2..351ade2 100644 --- a/homemaker.go +++ b/homemaker.go @@ -91,7 +91,7 @@ func main() { } taskName := flag.String("task", "default", "name of task to execute") - dstDir := flag.String("dest", currUsr.HomeDir, "target directory for tasks") + dstDir := flag.String("dest_dir", currUsr.HomeDir, "target directory for tasks") force := flag.Bool("force", true, "create parent directories to target") clobber := flag.Bool("clobber", false, "delete files and directories at target") verbose := flag.Bool("verbose", false, "verbose output") diff --git a/link.go b/link.go index 618c48e..523490d 100644 --- a/link.go +++ b/link.go @@ -71,7 +71,7 @@ func createPath(loc string, flags int) error { return nil } -func (this *link) source() string { +func (this *link) destination() string { if len(*this) > 0 { return (*this)[0] } @@ -79,12 +79,12 @@ func (this *link) source() string { return "" } -func (this *link) destination() string { +func (this *link) source() string { if len(*this) > 1 { return (*this)[1] } - return this.source() + return this.destination() } func (this *link) valid() bool {