main: simple Usage description and add a go modules file

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2023-04-11 14:14:54 -04:00
parent 784424af92
commit 022dad64e7
2 changed files with 9 additions and 0 deletions

3
go.mod Normal file
View File

@ -0,0 +1,3 @@
module github.com/vbatts/dedupe-linker
go 1.20

View File

@ -32,6 +32,12 @@ func init() {
if os.Getenv("VARBASEDIR") != "" {
varBaseDir = filepath.Clean(os.Getenv("VARBASEDIR"))
}
flag.Usage = func() {
fmt.Fprintf(flag.CommandLine.Output(), "Usage of %s:\n", os.Args[0])
fmt.Fprintf(flag.CommandLine.Output(), "\nThis app will make hardlinks of a directory tree, to a content addressible collection in the 'basedir'\n\n")
flag.PrintDefaults()
}
}
func main() {