package main import ( "fmt" "runtime/debug" "go.uber.org/fx" "sneak.berlin/go/directory/internal/config" "sneak.berlin/go/directory/internal/database" "sneak.berlin/go/directory/internal/globals" "sneak.berlin/go/directory/internal/importer" "sneak.berlin/go/directory/internal/logger" "sneak.berlin/go/directory/internal/store" ) var ( Appname string = "importer" Version string Buildarch string ) var Commit = func() string { if info, ok := debug.ReadBuildInfo(); ok { for _, setting := range info.Settings { if setting.Key == "vcs.revision" { return setting.Value } } } return "" }() func main() { fmt.Println("Commit: ", Commit) globals.Appname = Appname globals.Version = Version globals.Buildarch = Buildarch fx.New( fx.Provide( config.New, database.New, store.New, globals.New, logger.New, importer.New, ), fx.Invoke(func(*importer.Importer) {}), ).Run() }