diff options
Diffstat (limited to 'commands')
-rw-r--r-- | commands/ls.go | 8 | ||||
-rw-r--r-- | commands/show.go | 8 | ||||
-rw-r--r-- | commands/webui.go | 6 |
3 files changed, 11 insertions, 11 deletions
diff --git a/commands/ls.go b/commands/ls.go index 4ff4b315..7bab429d 100644 --- a/commands/ls.go +++ b/commands/ls.go @@ -5,7 +5,7 @@ import ( "github.com/MichaelMure/git-bug/bug" "github.com/MichaelMure/git-bug/cache" - "github.com/MichaelMure/git-bug/util" + "github.com/MichaelMure/git-bug/util/colors" "github.com/spf13/cobra" ) @@ -61,10 +61,10 @@ func runLsBug(cmd *cobra.Command, args []string) error { authorFmt := fmt.Sprintf("%-15.15s", author.Name) fmt.Printf("%s %s\t%s\t%s\t%s\n", - util.Cyan(b.HumanId()), - util.Yellow(snapshot.Status), + colors.Cyan(b.HumanId()), + colors.Yellow(snapshot.Status), titleFmt, - util.Magenta(authorFmt), + colors.Magenta(authorFmt), snapshot.Summary(), ) } diff --git a/commands/show.go b/commands/show.go index 71ec1b57..a45eb9b6 100644 --- a/commands/show.go +++ b/commands/show.go @@ -6,7 +6,7 @@ import ( "strings" "github.com/MichaelMure/git-bug/cache" - "github.com/MichaelMure/git-bug/util" + "github.com/MichaelMure/git-bug/util/colors" "github.com/spf13/cobra" ) @@ -42,13 +42,13 @@ func runShowBug(cmd *cobra.Command, args []string) error { // Header fmt.Printf("[%s] %s %s\n\n", - util.Yellow(snapshot.Status), - util.Cyan(snapshot.HumanId()), + colors.Yellow(snapshot.Status), + colors.Cyan(snapshot.HumanId()), snapshot.Title, ) fmt.Printf("%s opened this issue %s\n\n", - util.Magenta(firstComment.Author.Name), + colors.Magenta(firstComment.Author.Name), firstComment.FormatTime(), ) diff --git a/commands/webui.go b/commands/webui.go index a2da8be7..66cc2a9d 100644 --- a/commands/webui.go +++ b/commands/webui.go @@ -14,7 +14,7 @@ import ( "github.com/MichaelMure/git-bug/graphql" "github.com/MichaelMure/git-bug/repository" - "github.com/MichaelMure/git-bug/util" + "github.com/MichaelMure/git-bug/util/git" "github.com/MichaelMure/git-bug/webui" "github.com/gorilla/mux" "github.com/phayes/freeport" @@ -111,7 +111,7 @@ func newGitFileHandler(repo repository.Repo) http.Handler { } func (gfh *gitFileHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - hash := util.Hash(mux.Vars(r)["hash"]) + hash := git.Hash(mux.Vars(r)["hash"]) if !hash.IsValid() { http.Error(rw, "invalid git hash", http.StatusBadRequest) @@ -122,7 +122,7 @@ func (gfh *gitFileHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request) { // This can be a problem for big files. There might be a way around // that by implementing a io.ReadSeeker that would read and discard // data when a seek is called. - data, err := gfh.repo.ReadData(util.Hash(hash)) + data, err := gfh.repo.ReadData(git.Hash(hash)) if err != nil { http.Error(rw, err.Error(), http.StatusInternalServerError) return |