Ayiga / go-kit-middlewarer

A utility for generating layers for the go-kit framework
MIT License
85 stars 9 forks source link

[Bug & Suggestion] There is no helpful hint. #14

Closed dinfer closed 6 years ago

dinfer commented 6 years ago

I Install the tool

go get github.com/ayiga/go-kit-middlewarer && \
go install github.com/ayiga/go-kit-middlewarer

and I don't know how to use it. so I type

go-kit-middlewarer login/login.go # the interface file is inside the file 

But I got the prompt

Usage of go-kit-middlewarer:
        %!s(MISSING) [flags] -type T [directory]

What's that ?

Ayiga commented 6 years ago

Hey @dinfer,

Sorry you're having some troubles, it's been quite a while since I last touched this project, almost a year now. However, you're meant to run go-kit-middlewarer via an invocation of go generate.

It looks like the second line of the usage string seems to have some bad formatting which is causing the "%!s(MISSING)" error.

If you look at this line you can see what the intention for how the command is supposed to be used is. it should still work by invoking go-kit-middlewarer -type <TYPE> where <TYPE> is the interface type you are meant to generate layers for. Otherwise the generator isn't sure about which interface you are meant to be targeting.

Please let me know if that helped you, and perhaps I can update that usage message. Unfortunately, I don't get a lot of time to write in golang these days, so I can't make any guarantees.

If you have any other questions,

Please let me know,

Thanks,

~ Ayiga

dinfer commented 6 years ago

Thanks, you help me alot. ;) I'm closing it.

By the way, Are you using go-kit now? or would you like use go-kit in your next project?