0
   func New(url string) APIRequest {
    url := fmt.Sprintf("/api/%s%s", hmac.version, url)
    r := APIRequest{URL: url}
    return r
      }

whenever I use the ** url := fmt.Sprintf("/api/%s%s", hmac.version, url) I get this error pkg\apirequest\apirequest.go:125:34: cannot refer to unexported name hmac.version I am unsure as to what this means. Any help would be appreciated.

Carlos
  • 111
  • 8
  • 1
    See the [basics in the Tour of Go](https://go.dev/tour/basics/3). – Charlie Tumahai Dec 06 '21 at 16:23
  • See similar questions: [1](https://stackoverflow.com/q/24487943/13631587), [2](https://stackoverflow.com/q/53369360/13631587), –  Dec 06 '21 at 16:41
  • 2
    Does this answer your question? [Invoking struct function gives "cannot refer to unexported field or method"](https://stackoverflow.com/questions/24487943/invoking-struct-function-gives-cannot-refer-to-unexported-field-or-method) – Tom Dec 06 '21 at 23:25

0 Answers0