utrack / clay

Proto-first minimal server platform for gRPС+REST+Swagger APIs
MIT License
289 stars 39 forks source link

Fixed spelling #99

Closed beono closed 3 years ago

beono commented 3 years ago

Hi,

Some minor fixes in the comments

bullgare commented 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.

zerospiel commented 3 years ago

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")
}
bullgare commented 3 years ago

I like your example. I'd vote for this approach.

beono commented 3 years ago

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.

bullgare commented 3 years ago

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 .

utrack commented 3 years ago

Thanks!

True, I guess we could have different headers for implementation stubs.