Skip to content

Commit 498df16

Browse files
committed
Renamed imports to use GitHub package names.
1 parent 97a11cd commit 498df16

13 files changed

Lines changed: 36 additions & 13 deletions

cmd/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"os/exec"
77
"strings"
88

9-
"smartcommit/config"
9+
"github.com/manyfacedqod/smartcommit/config"
1010

1111
"github.com/spf13/cobra"
1212
)

cmd/generate.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ import (
1212
"github.com/manifoldco/promptui"
1313
"github.com/spf13/cobra"
1414

15-
"smartcommit/config"
16-
"smartcommit/diff"
17-
"smartcommit/llm"
15+
"github.com/manyfacedqod/smartcommit/config"
16+
"github.com/manyfacedqod/smartcommit/diff"
17+
"github.com/manyfacedqod/smartcommit/llm"
1818
)
1919

2020
var yesFlag bool

cmd/root.go

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
package cmd
22

3-
import "github.com/spf13/cobra"
3+
import (
4+
"fmt"
5+
6+
"github.com/spf13/cobra"
7+
)
8+
9+
const version = "v1.1.0"
410

511
var rootCmd = &cobra.Command{
612
Use: "smartcommit",
@@ -21,6 +27,15 @@ If you ever need assistance, run:
2127
or see:
2228
https://github.com/your‑repo/smartcommit#readme
2329
`,
30+
Version: version,
31+
32+
}
33+
var versionCmd = &cobra.Command{
34+
Use: "version",
35+
Short: "Print SmartCommit version",
36+
Run: func(cmd *cobra.Command, args []string) {
37+
fmt.Printf("SmartCommit %s\n", version)
38+
},
2439
}
2540

2641

@@ -30,4 +45,9 @@ func Execute() error {
3045

3146
func init() {
3247
rootCmd.CompletionOptions.DisableDefaultCmd = true
48+
rootCmd.SetVersionTemplate("SmartCommit {{.Version}}\n")
49+
rootCmd.AddCommand(versionCmd)
50+
rootCmd.SetVersionTemplate("SmartCommit {{.Version}}\n")
51+
52+
3353
}

cmd/setup.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"github.com/manifoldco/promptui"
99
"github.com/spf13/cobra"
1010

11-
"smartcommit/config"
11+
"github.com/manyfacedqod/smartcommit/config"
1212
)
1313

1414
var setupCmd = &cobra.Command{

go.mod

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
1-
module smartcommit
1+
module github.com/manyfacedqod/smartcommit
22

33
go 1.24.5
44

55
require (
6-
github.com/eiannone/keyboard v0.0.0-20220611211555-0d226195f203
7-
github.com/manifoldco/promptui v0.9.0
86
github.com/spf13/cobra v1.9.1
97
gopkg.in/yaml.v3 v3.0.1
108
)
119

1210
require (
1311
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect
12+
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
13+
)
14+
15+
require (
16+
github.com/eiannone/keyboard v0.0.0-20220611211555-0d226195f203
1417
github.com/inconshreveable/mousetrap v1.1.0 // indirect
18+
github.com/manifoldco/promptui v0.9.0
1519
github.com/spf13/pflag v1.0.6 // indirect
16-
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
1720
)

llm/http.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"net/http"
1010
"strings"
1111

12-
"smartcommit/config"
12+
"github.com/manyfacedqod/smartcommit/config"
1313
)
1414

1515
type HTTPProvider struct {

llm/registry.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package llm
22

33
import (
44
"fmt"
5-
"smartcommit/config"
5+
"github.com/manyfacedqod/smartcommit/config"
66
)
77

88
// Provider is anything that can Generate a commit message from a prompt.

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package main
22

3-
import "smartcommit/cmd"
3+
import "github.com/manyfacedqod/smartcommit/cmd"
44

55
func main() {
66
cmd.Execute()

smartcommit

-12.5 MB
Binary file not shown.

smartcommit-linux

-8.47 MB
Binary file not shown.

0 commit comments

Comments
 (0)