20 lines
348 B
Go
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)
|
|
}
|