dnscontrol/main.go
Jed Fox 1e337abcdf
Provide TypeScript typings for dnsconfig.js (#1830)
Co-authored-by: Jeffrey Cafferata <jeffrey@jcid.nl>
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2023-01-12 16:59:42 -05:00

35 lines
1 KiB
Go

package main
import (
"fmt"
"log"
"os"
"runtime/debug"
"github.com/StackExchange/dnscontrol/v3/commands"
"github.com/StackExchange/dnscontrol/v3/pkg/version"
_ "github.com/StackExchange/dnscontrol/v3/providers/_all"
)
//go:generate go run build/generate/generate.go build/generate/featureMatrix.go build/generate/functionTypes.go build/generate/dtsFile.go
// Version management. Goals:
// 1. Someone who just does "go get" has at least some information.
// 2. If built with build/build.go, more specific build information gets put in.
var (
SHA = ""
Version = ""
BuildTime = ""
)
func main() {
version.SHA = SHA
version.Semver = Version
version.BuildTime = BuildTime
log.SetFlags(log.LstdFlags | log.Lshortfile)
if info, ok := debug.ReadBuildInfo(); !ok && info == nil {
fmt.Fprint(os.Stderr, "Warning: dnscontrol was built without Go modules. See https://github.com/StackExchange/dnscontrol#from-source for more information on how to build dnscontrol correctly.\n\n")
}
os.Exit(commands.Run("dnscontrol " + version.Banner()))
}