Updating documentation, swapping source and destination fields for links

This commit is contained in:
Alex Yatskov 2015-04-06 10:20:41 +09:00
parent afc8559df2
commit 5e4ff87716
2 changed files with 4 additions and 4 deletions

View File

@ -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")

View File

@ -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 {