Skip to content

Commit

Permalink
Reorder imports and set TODOs for later refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
andygrunwald committed Sep 8, 2024
1 parent 6089fd7 commit dcd1c00
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ package cmd
import (
"encoding/json"
"fmt"
tea "github.com/charmbracelet/bubbletea"
"io"
"log/slog"
"os"
"os/exec"
"path/filepath"

tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/lipgloss"
"github.com/spf13/cobra"
"github.com/spf13/viper"
Expand Down Expand Up @@ -154,6 +154,7 @@ func (m VaultSelectionModel) View() string {
return s
}

// TODO Refactor and move to vault.1password.go
func getVaults() ([]Vault, error) {
cmd := exec.Command("op", "vault", "list", "--format", "json")
output, err := cmd.Output()
Expand Down Expand Up @@ -185,6 +186,7 @@ func initConfig() {
configFile := filepath.Join(buchhalterConfigDir, ".buchhalter.yaml")
buchhalterDir := filepath.Join(homeDir, "buchhalter")

// TODO We check the existing part of the configuration file here and below -> refctor to only once
if _, err := os.Stat(configFile); os.IsNotExist(err) {
err := utils.CreateDirectoryIfNotExists(buchhalterConfigDir)
if err != nil {
Expand Down

0 comments on commit dcd1c00

Please sign in to comment.