Files
go-example/hello/hello.go
2026-01-18 20:18:51 +08:00

20 lines
348 B
Go

package hello
import (
"encoding/base64"
"fmt"
"go-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)
}