Closed beono closed 3 years ago
TBH, I don't know why we even need these lines. Because of them any modifications to the files are rendered collapsed on Github. I try to remove it all the time anyway.
Hi, @bullgare
It makes sense, do you think that it's a better way to have comments on RPCs stubs rather than the first line? The second one looks good, IMO. I mean that stub can be generated like:
// source: github.com/user/repo/api/v1/file.proto
package foobarpkg
import (
"context"
"github.com/pkg/errors"
desc "github.com/user/repo/pkg/v1/foobar"
)
// FooBar should be implemented and commented well.
func (i *Implementation) FooBar(ctx context.Context, req *desc.Req) (*desc.Resp, error) {
return nil, errors.New("FooBar not implemented")
}
I like your example. I'd vote for this approach.
Maybe these lines are there to give someone a clue about the tool that was used to generate the file. Just in case a new project member is inspecting the application code.
We could at least change it to something that is not treated as a special case by IDE and GitHub/Gitlab
On Thu, Oct 22, 2020, 18:20 Eldar Rakhimberdin notifications@github.com wrote:
Maybe these lines are there to give someone a clue about the tool that was used to generate the file. Just in case a new project member is inspecting the application code.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/utrack/clay/pull/99#issuecomment-714606014, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAG74Y6DYA7UOBESLUSQWILSMBLWFANCNFSM4S2H644Q .
Thanks!
True, I guess we could have different headers for implementation stubs.
Hi,
Some minor fixes in the comments