diff options
author | Gregory Mullen <greg@cmdline.org> | 2019-06-27 10:33:12 -0700 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-06-29 14:24:19 -0400 |
commit | 546dfcd76dd228e0605359e9985f0b6a5672e8fa (patch) | |
tree | ac319094d0361c3ed41765c027cbaad2db5b05af /lib/dirstore.go | |
parent | 2a0961701c4cabecc53d134ed1782e5612e64580 (diff) | |
download | aerc-546dfcd76dd228e0605359e9985f0b6a5672e8fa.tar.gz |
Add new lib/dirstore to source completions from
Diffstat (limited to 'lib/dirstore.go')
-rw-r--r-- | lib/dirstore.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/dirstore.go b/lib/dirstore.go new file mode 100644 index 0000000..e7ebb77 --- /dev/null +++ b/lib/dirstore.go @@ -0,0 +1,20 @@ +package lib + +type DirStore struct { + dirs []string +} + +func NewDirStore() *DirStore { + return &DirStore{ + dirs: make([]string, 0), + } +} + +func (store *DirStore) Update(dirs []string) { + store.dirs = make([]string, len(dirs)) + copy(store.dirs, dirs) +} + +func (store *DirStore) List() []string { + return store.dirs +} |