Skip to content

Capitalization for common initialisms? #156

Closed

Description

@bufdev

I actually might be against this, I like that id maps to Id, urlmaps to Url, etc, but there's an issue that was filed over at protocolbuffers/protobuf#1321 so it's at least worth a discussion - any thoughts on changing the generator to output capitalizations for https://github.com/golang/lint/blob/master/lint.go#L719 ?

Activity

  1. dsymonds commented on Mar 24, 2016

    @dsymonds
    Contributor

    No, we won't do this. There's a never-ending list, we'll get it wrong, and it's simpler to stick with the current mechanical translation. We don't hold machine-generated code to the same high standard as human-written code.

  2. sleaze commented on Jun 25, 2017

    @sleaze

    But humans have to then consume and interact with this non-idiomatic machine-generated code.

    It's not a never ending list - just put the initialisms from golint.

    Refusing to acknowledge and / or fix this defect only ensures and forces that things continue to be generated in an ugly, non-compliant way, needlessly.

  3. manishrjain commented on Jun 26, 2017

    @manishrjain

    FWIW, I think Go linter should relax its rules on ID, URL etc. being capitalized.

  4. yaronsumel commented on Jun 26, 2017

    @yaronsumel

    you can use github.com/gogo/protobuf

    message C {
    	optional int64 size = 1 [(gogoproto.customname) = "MySize"];
    }
    
    type C struct {
    	MySize		*int64
    }
    
  5. sleaze commented on Jun 27, 2017

    @sleaze

    Thanks @yaronsumel , will give it a try.

  6. added a commit that references this issue on Jun 12, 2018
  7. locked and limited conversation to collaborators on Jun 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions