diff options
| author | Petter Rasmussen | 2016-01-18 21:37:56 +0100 | 
|---|---|---|
| committer | Petter Rasmussen | 2016-01-18 21:37:56 +0100 | 
| commit | e60833f88408139c8a92c3de9e8bfb87f295433e (patch) | |
| tree | 4381a63275da183801cef325a1ccce8ee522727d | |
| parent | 33716c2a43f92466401e08533308219fb520af9e (diff) | |
| download | gdrive-e60833f88408139c8a92c3de9e8bfb87f295433e.tar.bz2 | |
Simplify kv type
| -rw-r--r-- | drive/info.go | 4 | ||||
| -rw-r--r-- | drive/util.go | 11 | 
2 files changed, 5 insertions, 10 deletions
| diff --git a/drive/info.go b/drive/info.go index 080c23c..936b7da 100644 --- a/drive/info.go +++ b/drive/info.go @@ -50,8 +50,8 @@ func PrintFileInfo(args PrintFileInfoArgs) {      }      for _, item := range items { -        if item.value() != "" { -            fmt.Fprintf(args.Out, "%s: %s\n", item.key(), item.value()) +        if item.value != "" { +            fmt.Fprintf(args.Out, "%s: %s\n", item.key, item.value)          }      }  } diff --git a/drive/util.go b/drive/util.go index 7ad0945..be01c80 100644 --- a/drive/util.go +++ b/drive/util.go @@ -9,14 +9,9 @@ import (      "time"  ) -type kv [2]string - -func (self kv) key() string { -    return self[0] -} - -func (self kv) value() string { -    return self[1] +type kv struct { +    key string +    value string  }  func formatList(a []string) string { | 
