initial import

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2024-11-15 19:04:48 +03:00
parent 374f34fd60
commit a2a241cd78
6 changed files with 64 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
package main
import (
"context"
"os"
"go.unistack.org/micro/v3/logger/slog"
"go.unistack.org/servicechecker/pkg/config"
)
func main() {
ctx := context.Background()
log := slog.NewLogger()
f, err := os.Open("config.yaml")
if err != nil {
log.Fatal(ctx, "failed to open config", err)
}
defer f.Close()
cfg := &config.Config{}
if err = cfg.Parse(f); err != nil {
log.Fatal(ctx, "failed to open config", err)
}
}