decentral1se
2 years ago
No known key found for this signature in database
GPG Key ID: 3789458B3D0C410
1 changed files with
15 additions and
2 deletions
-
gshmm.go
|
|
@ -4,6 +4,7 @@ import ( |
|
|
|
"flag" |
|
|
|
"fmt" |
|
|
|
"os" |
|
|
|
"path/filepath" |
|
|
|
"strings" |
|
|
|
|
|
|
|
"github.com/charmbracelet/bubbles/textinput" |
|
|
@ -44,8 +45,20 @@ func initialModel() model { |
|
|
|
input := textinput.New() |
|
|
|
input.Focus() |
|
|
|
|
|
|
|
// TODO(d1): gather actual datasheets
|
|
|
|
ds := []string{"foo", "bar", "baz", "bing"} |
|
|
|
var ds []string |
|
|
|
// TODO(d1): handle error in interface?
|
|
|
|
_ = filepath.Walk(".", func(path string, info os.FileInfo, err error) error { |
|
|
|
if err != nil { |
|
|
|
return err |
|
|
|
} |
|
|
|
|
|
|
|
name := info.Name() |
|
|
|
if strings.HasSuffix(name, "pdf") { |
|
|
|
ds = append(ds, name) |
|
|
|
} |
|
|
|
|
|
|
|
return nil |
|
|
|
}) |
|
|
|
|
|
|
|
return model{ |
|
|
|
filterInput: input, |
|
|
|