chore: lint

This commit is contained in:
Manfred Touron 2019-01-19 20:01:03 +01:00
parent 1ff20846eb
commit 36f4177b68
No known key found for this signature in database
GPG Key ID: 6D4DED2EAB123456
7 changed files with 17 additions and 31 deletions

View File

@ -5,8 +5,8 @@ import (
"fmt" "fmt"
"github.com/go-kit/kit/endpoint" "github.com/go-kit/kit/endpoint"
pb "moul.io/protoc-gen-gotemplate/examples/go-kit/services/session/gen/pb"
oldcontext "golang.org/x/net/context" oldcontext "golang.org/x/net/context"
pb "moul.io/protoc-gen-gotemplate/examples/go-kit/services/session/gen/pb"
) )
var _ = endpoint.Chain var _ = endpoint.Chain

View File

@ -5,8 +5,8 @@ import (
"fmt" "fmt"
"github.com/go-kit/kit/endpoint" "github.com/go-kit/kit/endpoint"
pb "moul.io/protoc-gen-gotemplate/examples/go-kit/services/sprint/gen/pb"
oldcontext "golang.org/x/net/context" oldcontext "golang.org/x/net/context"
pb "moul.io/protoc-gen-gotemplate/examples/go-kit/services/sprint/gen/pb"
) )
var _ = endpoint.Chain var _ = endpoint.Chain

View File

@ -5,8 +5,8 @@ import (
"fmt" "fmt"
"github.com/go-kit/kit/endpoint" "github.com/go-kit/kit/endpoint"
pb "moul.io/protoc-gen-gotemplate/examples/go-kit/services/user/gen/pb"
oldcontext "golang.org/x/net/context" oldcontext "golang.org/x/net/context"
pb "moul.io/protoc-gen-gotemplate/examples/go-kit/services/user/gen/pb"
) )
var _ = endpoint.Chain var _ = endpoint.Chain

View File

@ -2,6 +2,8 @@
package company package company
import ( import (
"context"
"moul.io/protoc-gen-gotemplate/examples/import/output/models/article" "moul.io/protoc-gen-gotemplate/examples/import/output/models/article"
"moul.io/protoc-gen-gotemplate/examples/import/output/models/common" "moul.io/protoc-gen-gotemplate/examples/import/output/models/common"
) )
@ -10,20 +12,8 @@ type Repository interface {
GetArticle(getarticle *common.GetArticle) (*company.Article, []*company.Storage, error) GetArticle(getarticle *common.GetArticle) (*company.Article, []*company.Storage, error)
} }
// ------------------------- Public SDK ----------------------------- // ------------------------- Public SDK -----------------------------
// GetArticle : proto: missing extension proto: missing extension // GetArticle : proto: missing extension proto: missing extension
func (sdk *Sdk) GetArticle(ctx context.Context, func (sdk *Sdk) GetArticle(ctx context.Context,
getarticle *article.GetArticle, token, requestID string) (article *article.Article, storages []*article.GetArticleResponse_Storage, err error) { getarticle *article.GetArticle, token, requestID string) (article *article.Article, storages []*article.GetArticleResponse_Storage, err error) {
@ -31,10 +21,6 @@ func (sdk *Sdk) GetArticle(ctx context.Context,
out := &pb.GetArticleResponse{} out := &pb.GetArticleResponse{}
_ = out _ = out
return out.Article, out.Storages, nil return out.Article, out.Storages, nil
} }

View File

@ -4,8 +4,8 @@ package bbb
import ( import (
"fmt" "fmt"
"moul.io/protoc-gen-gotemplate/examples/single-package-mode/output/aaa"
"golang.org/x/net/context" "golang.org/x/net/context"
"moul.io/protoc-gen-gotemplate/examples/single-package-mode/output/aaa"
) )
type Service struct{} type Service struct{}

View File

@ -283,12 +283,12 @@ func samePath(a, b []int32) bool {
return true return true
} }
func findSourceInfoLocation(i interface{}) *descriptor.SourceCodeInfo_Location { /*func findSourceInfoLocation(i interface{}) *descriptor.SourceCodeInfo_Location {
if pathMap == nil { if pathMap == nil {
return nil return nil
} }
return pathMap[i] return pathMap[i]
} }*/
func leadingComment(i interface{}) string { func leadingComment(i interface{}) string {
loc := pathMap[i] loc := pathMap[i]