Skip to content

Commit

Permalink
Restores project structure
Browse files Browse the repository at this point in the history
  • Loading branch information
matzefriedrich committed Apr 25, 2024
1 parent 561cef0 commit b1bd968
Show file tree
Hide file tree
Showing 28 changed files with 42 additions and 76 deletions.
4 changes: 2 additions & 2 deletions example/cmd/charmer.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package main

import (
"github.com/matzefriedrich/cobra-extensions-example/commands"
"github.com/matzefriedrich/cobra-extensions/v0/pkg/charmer"
"github.com/matzefriedrich/cobra-extensions/example/commands"
"github.com/matzefriedrich/cobra-extensions/pkg/charmer"
"log"
)

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

import (
"github.com/matzefriedrich/cobra-extensions/example/commands"
"os"

"github.com/matzefriedrich/cobra-extensions-example/commands"
"github.com/spf13/cobra"
)

Expand Down
4 changes: 2 additions & 2 deletions example/commands/crypto_commands.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package commands

import (
"github.com/matzefriedrich/cobra-extensions/v0/pkg"
"github.com/matzefriedrich/cobra-extensions/v0/pkg/abstractions"
"github.com/matzefriedrich/cobra-extensions/pkg"
"github.com/matzefriedrich/cobra-extensions/pkg/abstractions"
"github.com/spf13/cobra"
)

Expand Down
4 changes: 2 additions & 2 deletions example/commands/decrypt.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package commands

import (
"github.com/matzefriedrich/cobra-extensions/pkg"
"github.com/matzefriedrich/cobra-extensions/pkg/abstractions"
"io"
"os"

"github.com/ProtonMail/gopenpgp/v2/crypto"
"github.com/matzefriedrich/cobra-extensions/v0/pkg"
"github.com/matzefriedrich/cobra-extensions/v0/pkg/abstractions"
"github.com/spf13/cobra"
)

Expand Down
4 changes: 2 additions & 2 deletions example/commands/encrypt.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package commands

import (
"github.com/matzefriedrich/cobra-extensions/pkg"
"github.com/matzefriedrich/cobra-extensions/pkg/abstractions"
"os"

"github.com/ProtonMail/gopenpgp/v2/crypto"
"github.com/matzefriedrich/cobra-extensions/v0/pkg"
"github.com/matzefriedrich/cobra-extensions/v0/pkg/abstractions"
"github.com/spf13/cobra"
)

Expand Down
5 changes: 2 additions & 3 deletions example/commands/hello.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ package commands

import (
"fmt"
"github.com/matzefriedrich/cobra-extensions/pkg"
"github.com/matzefriedrich/cobra-extensions/pkg/abstractions"

"github.com/matzefriedrich/cobra-extensions/v0/pkg/abstractions"

"github.com/matzefriedrich/cobra-extensions/v0/pkg"
"github.com/spf13/cobra"
)

Expand Down
21 changes: 0 additions & 21 deletions example/go.mod

This file was deleted.

24 changes: 23 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
module github.com/matzefriedrich/cobra-extensions

go 1.21.1
go 1.21

require (
github.com/ProtonMail/gopenpgp/v2 v2.7.5
github.com/google/uuid v1.6.0
github.com/spf13/cobra v1.8.0
github.com/stretchr/testify v1.9.0
)

require (
github.com/ProtonMail/go-crypto v0.0.0-20230717121422-5aa5874ade95 // indirect
github.com/ProtonMail/go-mime v0.0.0-20230322103455-7d82a3887f2f // indirect
github.com/cloudflare/circl v1.3.3 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
golang.org/x/crypto v0.7.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
4 changes: 4 additions & 0 deletions example/go.sum → go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46t
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
Expand All @@ -25,6 +27,7 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
Expand Down Expand Up @@ -69,6 +72,7 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package reflection

import (
"github.com/matzefriedrich/cobra-extensions/internal"
"github.com/matzefriedrich/cobra-extensions/pkg/abstractions"
"reflect"

"github.com/matzefriedrich/cobra-extensions/v0/internal"
"github.com/matzefriedrich/cobra-extensions/v0/pkg/abstractions"
)

type commandReflector[T any] struct {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion v0/pkg/typed_command.go → pkg/typed_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package pkg

import (
"context"
"github.com/matzefriedrich/cobra-extensions/pkg/reflection"

"github.com/matzefriedrich/cobra-extensions/v0/pkg/reflection"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion v0/pkg/typed_command_test.go → pkg/typed_command_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package pkg

import (
"github.com/matzefriedrich/cobra-extensions/v0/pkg/abstractions"
"github.com/matzefriedrich/cobra-extensions/pkg/abstractions"
"github.com/spf13/cobra"
"github.com/stretchr/testify/assert"
"testing"
Expand Down
17 changes: 0 additions & 17 deletions v0/go.mod

This file was deleted.

20 changes: 0 additions & 20 deletions v0/go.sum

This file was deleted.

0 comments on commit b1bd968

Please sign in to comment.