mirror of
https://github.com/go-acme/lego
synced 2026-03-16 23:45:50 +01:00
28 lines
593 B
Go
28 lines
593 B
Go
// Let's Encrypt client to go!
|
|
// CLI application for generating Let's Encrypt certificates using the ACME package.
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"runtime"
|
|
|
|
"github.com/go-acme/lego/v5/cmd"
|
|
"github.com/go-acme/lego/v5/log"
|
|
"github.com/urfave/cli/v3"
|
|
)
|
|
|
|
func main() {
|
|
app := cmd.CreateRootCommand()
|
|
app.Version = getVersion()
|
|
|
|
cli.VersionPrinter = func(cmd *cli.Command) {
|
|
fmt.Printf("lego version %s %s/%s\n", cmd.Version, runtime.GOOS, runtime.GOARCH)
|
|
}
|
|
|
|
err := app.Run(context.Background(), os.Args)
|
|
if err != nil {
|
|
log.Fatal("Error", log.ErrorAttr(err))
|
|
}
|
|
}
|