Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Call to GetAccountSettings API is redundant in blank-go #276

Copy link
Copy link
Closed
@gytisrepecka

Description

@gytisrepecka
Issue body actions

There is no use running function callLambda() two times:

  1. In init at
  2. In separate call under handleRequest with error handling:

Since it does exactly the same (retrieves settings from GetAccountSettings API), no need to run it two times.

As we might want to have values of those settings before running actual Lambda functionality, perhaps it makes sense leaving them under init but removing from handleRequest. As init function does not return anything, maybe it would make sense to send callLambda error to log like this:

func init() {
  _, err := callLambda()
  if err != nil {
    log.Printf("ERROR calling GetAccountSettings API: %s", err)
  }
}

What do you think? If such change makes sense, I will create pull request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.