Skip to content
This repository has been archived by the owner on Feb 3, 2023. It is now read-only.

Commit

Permalink
move file
Browse files Browse the repository at this point in the history
  • Loading branch information
ingbyr committed Sep 4, 2022
1 parent b646864 commit 630633e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 19 deletions.
9 changes: 3 additions & 6 deletions cmd/root.go → cmd.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package cmd
package main

import (
"fmt"
"github.com/spf13/cobra"
)

var (
root = &cobra.Command{
cmd = &cobra.Command{
Use: "gohost",
Short: "Simple host switcher tool made by ingbyr",
Run: func(cmd *cobra.Command, args []string) {
Expand All @@ -20,7 +19,5 @@ var (
)

func Execute() {
if err := root.Execute(); err != nil {
fmt.Println(err)
}

}
2 changes: 1 addition & 1 deletion host.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ package main
type Host interface {
Name() string
Content() []byte
Labels() map[string]string
Desc() string
}
12 changes: 1 addition & 11 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
package main

import (
"github.com/timshannon/bolthold"
)

func main() {
//cmd.Execute()
store, err := NewStore(&StoreOptions{
File: cfg.DBFile,
Options: &bolthold.Options{},
})
defer store.Close()
if err != nil {
if err := cmd.Execute(); err != nil {
panic(err)
}
}
3 changes: 2 additions & 1 deletion tui/model.go → tui.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package tui
package main

import (
tea "github.com/charmbracelet/bubbletea"
)

type Model struct {
groupService *GroupService
}

func New() *Model {
Expand Down

0 comments on commit 630633e

Please sign in to comment.