awslabs / aws-lambda-go-api-proxy

lambda-go-api-proxy makes it easy to port APIs written with Go frameworks such as Gin (https://gin-gonic.github.io/gin/ ) to AWS Lambda and Amazon API Gateway.
Apache License 2.0
1.05k stars 197 forks source link

use idiomatic init func in example code #20

Closed nelz9999 closed 5 years ago

nelz9999 commented 5 years ago

Issue #, if available:

Description of changes: The existing demo code is open to race conditions, whereas there is a language-provided idiom for doing package level initialization.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.