Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

project name refactor #4

Merged
merged 2 commits into from
Apr 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package cmd

import (
"github.com/spf13/cobra"
"pman/pkg"
"github.com/theredditbandit/pman/pkg"
)

var addCmd = &cobra.Command{
Expand Down
3 changes: 1 addition & 2 deletions cmd/alias.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ package cmd

import (
"fmt"
"pman/pkg/db"

"github.com/spf13/cobra"
"github.com/theredditbandit/pman/pkg/db"
)

// aliasCmd represents the alias command
Expand Down
4 changes: 2 additions & 2 deletions cmd/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package cmd

import (
"fmt"
"github.com/theredditbandit/pman/pkg/db"
"log"
"pman/pkg/db"

"github.com/spf13/cobra"
)
Expand Down Expand Up @@ -44,7 +44,7 @@ var delCmd = &cobra.Command{
log.Fatal(err)
}

fmt.Printf("Successfully deleted %s from the db \n",projName)
fmt.Printf("Successfully deleted %s from the db \n", projName)

},
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package cmd

import (
"fmt"
"github.com/theredditbandit/pman/pkg/db"
"os"
"path/filepath"
"pman/pkg/db"

"github.com/charmbracelet/glamour"
"github.com/spf13/cobra"
Expand Down
2 changes: 1 addition & 1 deletion cmd/init.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cmd

import (
"pman/pkg"
"github.com/theredditbandit/pman/pkg"

"github.com/spf13/cobra"
)
Expand Down
13 changes: 4 additions & 9 deletions cmd/ls.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ package cmd

import (
"fmt"
"log"
"pman/pkg"
"pman/pkg/db"
"pman/pkg/ui"

"github.com/spf13/cobra"
"github.com/theredditbandit/pman/pkg"
"github.com/theredditbandit/pman/pkg/db"
"github.com/theredditbandit/pman/pkg/ui"
"log"
)

var lsCmd = &cobra.Command{
Expand All @@ -25,14 +24,10 @@ var lsCmd = &cobra.Command{
if filterFlag != "" {
fmt.Println("Filtering by status : ", filterFlag)
data := pkg.FilterByStatus(data, filterFlag)
_ = data
ui.RenderTable(data)
// ui.Pikachu()
return
}
ui.RenderTable(data)
// ui.Pikachu()

},
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/reset.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package cmd

import (
"fmt"
"pman/pkg/db"
"github.com/theredditbandit/pman/pkg/db"

"github.com/spf13/cobra"
)
Expand Down
5 changes: 2 additions & 3 deletions cmd/set.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package cmd

import (
"fmt"
"pman/pkg/db"
"github.com/theredditbandit/pman/pkg/db"

"github.com/spf13/cobra"
)
Expand All @@ -16,7 +16,7 @@ var setCmd = &cobra.Command{

Common statuses: Indexed (default) ,Idea , Started , Paused , Completed , Aborted , Ongoing , Not Started
`,
Run: func(cmd *cobra.Command, args []string) { // BUG : cannot set the status using the alias.
Run: func(cmd *cobra.Command, args []string) {
interactiveFlag, _ := cmd.Flags().GetBool("i") // TODO: Implement this
if interactiveFlag {
fmt.Println("Not implemented yet")
Expand All @@ -29,7 +29,6 @@ var setCmd = &cobra.Command{
var pname string
alias := args[0]
status := args[1]

project, err := db.GetRecord(alias, ProjectAliasBucket)
if err == nil {
pname = project
Expand Down
4 changes: 2 additions & 2 deletions cmd/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package cmd

import (
"fmt"
"pman/pkg"
"pman/pkg/db"
"github.com/theredditbandit/pman/pkg"
"github.com/theredditbandit/pman/pkg/db"

"github.com/spf13/cobra"
)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module pman
module github.com/theredditbandit/pman

go 1.22.2

Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package main

import "pman/cmd"
import "github.com/theredditbandit/pman/cmd"

func main() {
cmd.Execute()
Expand Down
2 changes: 1 addition & 1 deletion pkg/indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package pkg

import (
"fmt"
"github.com/theredditbandit/pman/pkg/db"
"log"
"os"
"path/filepath"
"pman/pkg/db"
)

const StatusBucket = "projects"
Expand Down
4 changes: 2 additions & 2 deletions pkg/ui/statusTable.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"github.com/charmbracelet/lipgloss"
"github.com/charmbracelet/lipgloss/table"
"github.com/theredditbandit/pman/pkg"
"github.com/theredditbandit/pman/pkg/db"
"os"
"pman/pkg"
"pman/pkg/db"
"sort"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package pkg

import (
"fmt"
"github.com/theredditbandit/pman/pkg/db"
"golang.org/x/text/cases"
"golang.org/x/text/language"
"pman/pkg/db"
)

func TitleCase(s string) string {
Expand Down