mirror of
https://github.com/bolucat/Archive.git
synced 2026-04-22 16:07:49 +08:00
24 lines
513 B
Go
24 lines
513 B
Go
package shared
|
|
|
|
import (
|
|
"fmt"
|
|
"runtime"
|
|
"strings"
|
|
|
|
"github.com/juicity/juicity/config"
|
|
)
|
|
|
|
func multiline(parts ...string) string {
|
|
return strings.Join(parts, "\n")
|
|
}
|
|
|
|
func GetVersion(cgoEnabled int) string {
|
|
return multiline(
|
|
fmt.Sprintf(config.Version),
|
|
fmt.Sprintf("go runtime %v %v/%v", runtime.Version(), runtime.GOOS, runtime.GOARCH),
|
|
fmt.Sprintf("CGO_ENABLED: %v", cgoEnabled),
|
|
"Copyright (c) 2023 juicity",
|
|
"License GNU AGPLv3 <https://github.com/juicity/juicity/blob/main/LICENSE>",
|
|
)
|
|
}
|