summaryrefslogtreecommitdiff
path: root/args.go
diff options
context:
space:
mode:
authorEyal Posener <[email protected]>2019-07-05 15:10:58 +0300
committerEyal Posener <[email protected]>2019-07-05 17:29:25 +0300
commit72c5c945f0d5861ba1d4e51a0a5ac36a4bef3868 (patch)
tree0dbc83883d33ac239db651f19be3fe67fd3dc361 /args.go
parent29f43e246ec41ee311a0a9bc24b15cb4ece4e513 (diff)
Deprecate Args.Directory()
Diffstat (limited to 'args.go')
-rw-r--r--args.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/args.go b/args.go
index 17ab2c6..16e5ab3 100644
--- a/args.go
+++ b/args.go
@@ -28,6 +28,8 @@ type Args struct {
// Directory gives the directory of the current written
// last argument if it represents a file name being written.
// in case that it is not, we fall back to the current directory.
+//
+// Deprecated.
func (a Args) Directory() string {
if info, err := os.Stat(a.Last); err == nil && info.IsDir() {
return fixPathForm(a.Last, a.Last)