This commit is contained in:
2026-04-04 00:09:02 +08:00
commit 38e896363e
117 changed files with 119311 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
package main
import (
"fmt"
"os/exec"
)
func getLicenseInlfo() (license, []error) {
var errors []error
var lic license
cmd := exec.Command("dci", "license", "check")
output, err := cmd.Output()
if err != nil {
err = fmt.Errorf("Ошибка выполнения команды dci license check : %s", err)
errors = append(errors, err)
}
lic.LicenseCheck = string(output)
cmd = exec.Command("dci", "license", "info")
output, err = cmd.Output()
if err != nil {
err = fmt.Errorf("Ошибка выполнения команды dci license info : %s", err)
errors = append(errors, err)
}
lic.LicenseInfo = string(output)
return lic, errors
}