Any idea how to get rid of this warning? I don't w...
# golang
p
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
i
Hello! Yep, just change that to the following:
Copy code
lambda.FunctionEnvironmentArgs{
  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
Foo{x}
less desirable than
Foo{Bar: x}
because if
Foo
adds a new field, the former will stop compiling. So for exported types, they recommend the latter.
p
@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?
i
@plain-parrot-21984 Certainly! I looked up the API reference for the lambda package: here's the section on FunctionEnvironmentArgs
p
Thank you @incalculable-parrot-23117, I appreciate the the insight 💡 It'll help me in the future 😊