From 9a4fa8633f337f3efe72aa85937b141fc513bdf1 Mon Sep 17 00:00:00 2001 From: Mechiel Lukkien Date: Fri, 4 Oct 2024 09:34:37 +0200 Subject: [PATCH] add missing file from previous commit --- licenses.go | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 licenses.go diff --git a/licenses.go b/licenses.go new file mode 100644 index 0000000..e5474cc --- /dev/null +++ b/licenses.go @@ -0,0 +1,26 @@ +package main + +import ( + "embed" + "os" + + "github.com/mjl-/mox/mox-" +) + +//go:embed LICENSE.MIT LICENSE.MPLv2.0 licenses/* +var licensesFsys embed.FS + +func init() { + mox.LicensesFsys = licensesFsys +} + +func cmdLicenses(c *cmd) { + c.help = `Print licenses of mox source code and dependencies.` + args := c.Parse() + if len(args) != 0 { + c.Usage() + } + + err := mox.LicensesWrite(os.Stdout) + xcheckf(err, "write") +}