Do a large chunk of the move to go
This commit moves a huge chunk of the code to go. The TODO.md document indicates what is left to be done.
This commit is contained in:
parent
db2ad9b4bd
commit
7b38fdd801
93 changed files with 4689 additions and 645 deletions
47
cmd/license.go
Normal file
47
cmd/license.go
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
package cmd
|
||||
|
||||
import (
|
||||
wisski_distillery "github.com/FAU-CDI/wisski-distillery"
|
||||
"github.com/FAU-CDI/wisski-distillery/env"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/legal"
|
||||
)
|
||||
|
||||
// License is the 'wdcli license' command.
|
||||
//
|
||||
// The license command prints to standard output legal notices about the wdcli program.
|
||||
var License wisski_distillery.Command = license{}
|
||||
|
||||
type license struct{}
|
||||
|
||||
func (license) Description() wisski_distillery.Description {
|
||||
return wisski_distillery.Description{
|
||||
Requirements: env.Requirements{
|
||||
NeedsConfig: false,
|
||||
},
|
||||
Command: "license",
|
||||
Description: "Print licensing information about wdcli and exit. ",
|
||||
}
|
||||
}
|
||||
|
||||
func (license) AfterParse() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (license) Run(context wisski_distillery.Context) error {
|
||||
context.Printf(stringLicenseInfo, wisski_distillery.License, legal.Notices)
|
||||
return nil
|
||||
}
|
||||
|
||||
const stringLicenseInfo = `
|
||||
wdcli -- WissKI Distillery Command Line Utility
|
||||
https://github.com/FAU-CDI/wisski-distillery
|
||||
|
||||
================================================================================
|
||||
wdcli is licensed under the terms of the AGPL Version 3.0 License:
|
||||
|
||||
%s
|
||||
================================================================================
|
||||
|
||||
Furthermore, this executable may include code from the following projects:
|
||||
%s
|
||||
`
|
||||
Loading…
Add table
Add a link
Reference in a new issue