Fix “should not use basic type string as key in context.WithValue” golint
问题 I am passing an uuid in using the Context and WithValue to subsequent functions that handle this *http.request . This uuid is was passed in the authorization header to a REST call to identify a person. The authorization token is verified and needs to accessible to check if the call is itself is authorized. I used: ctx := context.WithValue(r.Context(), string("principal_id"), *id) But golint complains: should not use basic type string as key in context.WithValue What is the best option that