Skip to content

Commit

Permalink
Change package manager and fix logrus issue
Browse files Browse the repository at this point in the history
  • Loading branch information
kujtimiihoxha committed Apr 1, 2019
1 parent 69ae4c3 commit 57258c4
Show file tree
Hide file tree
Showing 18 changed files with 114 additions and 54 deletions.
2 changes: 1 addition & 1 deletion cmd/client.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package cmd

import (
"github.com/Sirupsen/logrus"
"github.com/kujtimiihoxha/kit/generator"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/docker.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package cmd

import (
"github.com/Sirupsen/logrus"
"github.com/kujtimiihoxha/kit/generator"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
Expand Down
4 changes: 2 additions & 2 deletions cmd/g_service.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package cmd

import (
"github.com/Sirupsen/logrus"
"github.com/kujtimiihoxha/kit/generator"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
Expand Down Expand Up @@ -47,7 +47,7 @@ var initserviceCmd = &cobra.Command{
func init() {
generateCmd.AddCommand(initserviceCmd)
initserviceCmd.Flags().StringP("transport", "t", "http", "The transport you want your service to be initiated with")
initserviceCmd.Flags().BoolP("dmw","w", false, "Generate default middleware for service and endpoint")
initserviceCmd.Flags().BoolP("dmw", "w", false, "Generate default middleware for service and endpoint")
initserviceCmd.Flags().Bool("gorilla", false, "Generate http using gorilla mux")
initserviceCmd.Flags().StringArrayVarP(&methods, "methods", "m", []string{}, "Specify methods to be generated")
initserviceCmd.Flags().Bool("svc-mdw", false, "If set a default Logging and Instrumental middleware will be created and attached to the service")
Expand Down
2 changes: 1 addition & 1 deletion cmd/middleware.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package cmd

import (
"github.com/Sirupsen/logrus"
"github.com/kujtimiihoxha/kit/generator"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os/exec"
"runtime"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/service.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package cmd

import (
"github.com/Sirupsen/logrus"
"github.com/kujtimiihoxha/kit/generator"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion fs/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"os"

"github.com/Sirupsen/logrus"
"github.com/Songmu/prompter"
"github.com/sirupsen/logrus"
"github.com/spf13/afero"
"github.com/spf13/viper"
)
Expand Down
4 changes: 2 additions & 2 deletions generator/add_transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ import (

"errors"

"github.com/Sirupsen/logrus"
"github.com/dave/jennifer/jen"
"github.com/emicklei/proto"
"github.com/emicklei/proto-contrib/pkg/protofmt"
"github.com/kujtimiihoxha/kit/fs"
"github.com/kujtimiihoxha/kit/parser"
"github.com/kujtimiihoxha/kit/utils"
"github.com/sirupsen/logrus"
"github.com/spf13/viper"
"github.com/emicklei/proto-contrib/pkg/protofmt"
)

// GenerateTransport implement Gen, is used to generate a service transport
Expand Down
26 changes: 13 additions & 13 deletions generator/add_transport_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ func Test_newGenerateHTTPTransport(t *testing.T) {
args args
want Gen
}{
// TODO: Add test cases.
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down Expand Up @@ -747,7 +747,7 @@ func Test_generateHTTPTransport_Generate(t *testing.T) {
fields fields
wantErr bool
}{
// TODO: Add test cases.
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down Expand Up @@ -782,7 +782,7 @@ func Test_newGenerateHTTPTransportBase(t *testing.T) {
args args
want Gen
}{
// TODO: Add test cases.
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down Expand Up @@ -811,7 +811,7 @@ func Test_generateHTTPTransportBase_Generate(t *testing.T) {
fields fields
wantErr bool
}{
// TODO: Add test cases.
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down Expand Up @@ -845,7 +845,7 @@ func Test_newGenerateGRPCTransportProto(t *testing.T) {
args args
want Gen
}{
// TODO: Add test cases.
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down Expand Up @@ -874,7 +874,7 @@ func Test_generateGRPCTransportProto_Generate(t *testing.T) {
fields fields
wantErr bool
}{
// TODO: Add test cases.
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down Expand Up @@ -915,7 +915,7 @@ func Test_generateGRPCTransportProto_getService(t *testing.T) {
fields fields
want *proto.Service
}{
// TODO: Add test cases.
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down Expand Up @@ -955,7 +955,7 @@ func Test_generateGRPCTransportProto_generateRequestResponse(t *testing.T) {
name string
fields fields
}{
// TODO: Add test cases.
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down Expand Up @@ -997,7 +997,7 @@ func Test_generateGRPCTransportProto_getServiceRPC(t *testing.T) {
fields fields
args args
}{
// TODO: Add test cases.
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down Expand Up @@ -1030,7 +1030,7 @@ func Test_newGenerateGRPCTransportBase(t *testing.T) {
args args
want Gen
}{
// TODO: Add test cases.
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down Expand Up @@ -1059,7 +1059,7 @@ func Test_generateGRPCTransportBase_Generate(t *testing.T) {
fields fields
wantErr bool
}{
// TODO: Add test cases.
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down Expand Up @@ -1093,7 +1093,7 @@ func Test_newGenerateGRPCTransport(t *testing.T) {
args args
want Gen
}{
// TODO: Add test cases.
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down Expand Up @@ -1121,7 +1121,7 @@ func Test_generateGRPCTransport_Generate(t *testing.T) {
fields fields
wantErr bool
}{
// TODO: Add test cases.
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion generator/generate_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import (

"strings"

"github.com/Sirupsen/logrus"
"github.com/dave/jennifer/jen"
"github.com/kujtimiihoxha/kit/fs"
"github.com/kujtimiihoxha/kit/parser"
"github.com/kujtimiihoxha/kit/utils"
"github.com/sirupsen/logrus"
"github.com/spf13/viper"
)

Expand Down
2 changes: 1 addition & 1 deletion generator/generate_middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import (

"strings"

"github.com/Sirupsen/logrus"
"github.com/dave/jennifer/jen"
"github.com/kujtimiihoxha/kit/fs"
"github.com/kujtimiihoxha/kit/parser"
"github.com/kujtimiihoxha/kit/utils"
"github.com/sirupsen/logrus"
"github.com/spf13/viper"
)

Expand Down
2 changes: 1 addition & 1 deletion generator/generate_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import (
"path"
"strings"

"github.com/Sirupsen/logrus"
"github.com/dave/jennifer/jen"
"github.com/kujtimiihoxha/kit/fs"
"github.com/kujtimiihoxha/kit/parser"
"github.com/kujtimiihoxha/kit/utils"
"github.com/sirupsen/logrus"
"github.com/spf13/viper"
)

Expand Down
2 changes: 1 addition & 1 deletion generator/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ import (
"bytes"
"go/format"

"github.com/Sirupsen/logrus"
"github.com/dave/jennifer/jen"
"github.com/kujtimiihoxha/kit/fs"
"github.com/kujtimiihoxha/kit/parser"
"github.com/kujtimiihoxha/kit/utils"
"github.com/sirupsen/logrus"
)

// Gen represents a generator.
Expand Down
25 changes: 0 additions & 25 deletions glide.yaml

This file was deleted.

18 changes: 18 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module github.com/kujtimiihoxha/kit

go 1.12

require (
github.com/Songmu/prompter v0.0.0-20181014095714-d227c68538bd
github.com/alioygur/godash v0.0.0-20160919141744-af6b3da41c5a
github.com/dave/jennifer v1.3.0
github.com/emicklei/proto v1.6.10
github.com/emicklei/proto-contrib v0.0.0-20190206213850-73879796f936
github.com/mattn/go-isatty v0.0.7 // indirect
github.com/sirupsen/logrus v1.4.0
github.com/spf13/afero v1.2.2
github.com/spf13/cobra v0.0.3
github.com/spf13/viper v1.3.2
golang.org/x/tools v0.0.0-20190401163957-4fc9f0bfa59a
gopkg.in/yaml.v2 v2.2.2
)
67 changes: 67 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
github.com/Songmu/prompter v0.0.0-20181014095714-d227c68538bd h1:WPP3dYxBYZBo0q3t14UIvD0Myr848agWCVSlScH17E0=
github.com/Songmu/prompter v0.0.0-20181014095714-d227c68538bd/go.mod h1:fNhSFBGC+sg+dZ7AqDHgq+xYiom23TeTESzUbO7PIrE=
github.com/alioygur/godash v0.0.0-20160919141744-af6b3da41c5a h1:ejThr5VDBanPpuY7E68PuUK48xF+GKJ9b2RmNEmS0co=
github.com/alioygur/godash v0.0.0-20160919141744-af6b3da41c5a/go.mod h1:zi8h8bo9k9pONnS1MD9T7Ajmo7KLaK7u+1/63nUvB0I=
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk=
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/dave/jennifer v1.3.0 h1:p3tl41zjjCZTNBytMwrUuiAnherNUZktlhPTKoF/sEk=
github.com/dave/jennifer v1.3.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/emicklei/proto v1.6.8/go.mod h1:Dqn751twH9SasYqvA59Lb9Hz+itoJgmMoivX6k7OPZc=
github.com/emicklei/proto v1.6.10 h1:tXKViikmzSAh7X+SCUliSDphrK9JKKkJaAZB84XVCyY=
github.com/emicklei/proto v1.6.10/go.mod h1:rn1FgRS/FANiZdD2djyH7TMA9jdRDcYQ9IEN9yvjX0A=
github.com/emicklei/proto-contrib v0.0.0-20190206213850-73879796f936 h1:sXk80AaZ0sMwlkZ7rnJcTi2WgXzTZhZz3iS6tr1Sbro=
github.com/emicklei/proto-contrib v0.0.0-20190206213850-73879796f936/go.mod h1:WhnsyUacG9u39ADSgKY555WFJ4cVjZmEzN6vpvjfoQs=
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY=
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/mattn/go-isatty v0.0.7 h1:UvyT9uN+3r7yLEYSlJsbQGdsaB/a0DlgWP3pql6iwOc=
github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc=
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/sirupsen/logrus v1.4.0 h1:yKenngtzGh+cUSSh6GWbxW2abRqhYUSR/t/6+2QqNvE=
github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc=
github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8=
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cobra v0.0.3 h1:ZlrZ4XsMRm04Fr5pSFxBgfND2EBVa1nLpiy1stUsX/8=
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk=
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg=
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/spf13/viper v1.3.2 h1:VUFqw5KcqRf7i70GOzW7N+Q7+gxVBkSSqiXB12+JQ4M=
github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223 h1:DH4skfRX4EBpamg7iV4ZlCpblAHI6s6TDM39bFZumv8=
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/tools v0.0.0-20190401163957-4fc9f0bfa59a h1:8uDq1cly8U9Rv4OKK7v3+67Eci6dUaa/tGZbJ/2KzpM=
golang.org/x/tools v0.0.0-20190401163957-4fc9f0bfa59a/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"runtime"
"strings"

"github.com/Sirupsen/logrus"
"github.com/kujtimiihoxha/kit/cmd"
"github.com/kujtimiihoxha/kit/utils"
"github.com/sirupsen/logrus"
"github.com/spf13/afero"
"github.com/spf13/viper"
)
Expand Down
2 changes: 1 addition & 1 deletion parser/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"go/token"
"strings"

"github.com/Sirupsen/logrus"
"github.com/kujtimiihoxha/kit/utils"
"github.com/sirupsen/logrus"
)

// FileParser is the parser used by kit to parse go files.
Expand Down

0 comments on commit 57258c4

Please sign in to comment.