Function App Golang Application Settings

Kengie Ho 1 Reputation point
2022-03-01T22:48:33.563+00:00

Hi there,

With in Azure Function App, we can use ConfigurationBuilder to access Azure Application Settings in the Azure portal.

My question is there an equivalent library or example to how to code it in Golang so that any changes in the Application Settings Azure Portal can be reflected in the Golang Function App.

Thanks.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,642 questions
Azure App Configuration
Azure App Configuration
An Azure service that provides hosted, universal storage for Azure app configurations.
215 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MughundhanRaveendran-MSFT 12,451 Reputation points
    2022-03-02T13:15:07.893+00:00

    @Kengie Ho ,

    Thanks for reaching out to Q&A.

    ConfigurationBuilder is a .net assembly that can be used in a .net function app. So there is no out-of-the-box functionality that the Functions offer to access the application setting/environment variables. Please note that you will have to use custom handlers in order to get Golang support in Azure functions. You can use the regular methods in GO that are used to access the environment variables in the custom handler as well.

    Please refer to the following articles that access environment variables using Golang

    https://www.geeksforgeeks.org/golang-environment-variables/
    https://www.callicoder.com/go-read-write-environment-variables/

    I hope this helps!

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.