-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: use rofi pkg to craft the menu
- Loading branch information
1 parent
1fa56ed
commit c54219c
Showing
6 changed files
with
113 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,28 @@ | ||
package program | ||
|
||
import "io" | ||
import ( | ||
"fmt" | ||
"io" | ||
) | ||
|
||
func (p *Program) executeList(w io.Writer) error { | ||
dataSources, err := p.db.RetrieveDatasources(p.account) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
if len(dataSources) == 0 { | ||
fmt.Printf("[list] No data sources found, syncing...\n") | ||
if err := p.executeSync(); err != nil { | ||
return err | ||
} | ||
|
||
dataSources, err = p.db.RetrieveDatasources(p.account) | ||
if err != nil { | ||
return err | ||
} | ||
} | ||
|
||
printDataSources(dataSources, w) | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters