feat: add configuration management and update deployment files

This commit is contained in:
2026-01-10 19:56:51 +08:00
parent 6730ceafa6
commit d1a5240c34
10 changed files with 180 additions and 21 deletions

View File

@@ -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)
}