Any idea how to get rid of this warning? I don't w...
# golang
Any idea how to get rid of this warning? I don't want to disable the warning if it's a valid issue, but I can't figure out if I did something wrong from the - very limited - API documentation regarding lambda environment variables
Hello! Yep, just change that to the following:
Copy code
  Variables: pulumi.StringMap{
    // ...
That'll get rid of the warning.
For background, that's a warning generated by Go's default linter set. They consider
less desirable than
Foo{Bar: x}
because if
adds a new field, the former will stop compiling. So for exported types, they recommend the latter.
@incalculable-parrot-23117 Super! Thank you. I was reading online about this message and figured that probably something was missing but couldn't figure out what. Where did you find that the missing piece was "Variables" if I may ask?
@plain-parrot-21984 Certainly! I looked up the API reference for the lambda package: here's the section on FunctionEnvironmentArgs
Thank you @incalculable-parrot-23117, I appreciate the the insight 💡 It'll help me in the future 😊