feat: add configuration management and update deployment files
This commit is contained in:
@@ -1,11 +1,19 @@
|
||||
package hello
|
||||
|
||||
import (
|
||||
"encoding/base64"
|
||||
"fmt"
|
||||
"k8s-example/cmn/utils"
|
||||
"net/http"
|
||||
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
func Handler(w http.ResponseWriter, _ *http.Request) {
|
||||
utils.Fnc()
|
||||
_, _ = w.Write([]byte("Hello, World!"))
|
||||
|
||||
encodedTestKey := base64.StdEncoding.EncodeToString([]byte(viper.GetString("test.key")))
|
||||
|
||||
fmt.Println(encodedTestKey)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user