add dockerfile with multistage
This commit is contained in:
@ -1,9 +1,20 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
func main() {
|
||||
fmt.Println("Hello world")
|
||||
viper.AddConfigPath("config")
|
||||
err := viper.ReadInConfig()
|
||||
if err != nil {
|
||||
log.Fatalf("Error loading file: %v", err.Error())
|
||||
}
|
||||
api_key := viper.GetString("API_KEY")
|
||||
fmt.Println("Hello world, and API_KEY:", api_key)
|
||||
c := fmt.Sprintf("Test text: %s", "formatted")
|
||||
fmt.Printf("Some text: %s", c)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user