split cursors
This commit is contained in:
parent
eb2191045e
commit
f74f50c148
3 changed files with 58 additions and 32 deletions
|
|
@ -17,7 +17,6 @@ func genBasicAuthHeader(user, password string) string {
|
|||
}
|
||||
|
||||
func listGemLogs(config *Config) ([]GemlogListEntry, error) {
|
||||
slog.Info("Listing gemlogs from couchdb")
|
||||
url := fmt.Sprintf("%s:%d/gemlog/_design/gemlog-cli/_view/list", config.CouchDB.Host, config.CouchDB.Port)
|
||||
req, err := http.NewRequest("GET", url, nil)
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -1,15 +1,12 @@
|
|||
package gemlog
|
||||
|
||||
import (
|
||||
"log/slog"
|
||||
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
)
|
||||
|
||||
func LoadGemlogCMD(config *Config) tea.Cmd {
|
||||
return func() tea.Msg {
|
||||
logs, err := listGemLogs(config)
|
||||
slog.Info("Loaded gemlogs", "count", len(logs))
|
||||
if err != nil {
|
||||
return ErrorMsg{err}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue