mirror of https://github.com/rocboss/paopao-ce
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
670 B
25 lines
670 B
2 years ago
|
// Copyright 2022 ROC. All rights reserved.
|
||
|
// Use of this source code is governed by a MIT style
|
||
|
// license that can be found in the LICENSE file.
|
||
|
|
||
1 year ago
|
package utils
|
||
2 years ago
|
|
||
2 years ago
|
import (
|
||
|
"fmt"
|
||
|
|
||
|
"github.com/Masterminds/semver/v3"
|
||
|
)
|
||
2 years ago
|
|
||
|
func PrintHelloBanner(text string) {
|
||
|
|
||
|
fmt.Println(" ____ __ __ ____ __ __ ")
|
||
|
fmt.Println("( _ \\ / _\\ / \\( _ \\ / _\\ / \\ ")
|
||
|
fmt.Println(" ) __// \\( O )) __// \\( O )")
|
||
|
fmt.Println("(__) \\_/\\_/ \\__/(__) \\_/\\_/ \\__/ ")
|
||
|
fmt.Println(text)
|
||
|
}
|
||
2 years ago
|
|
||
|
func SidStr(name string, version *semver.Version, size int) string {
|
||
2 years ago
|
return fmt.Sprintf(fmt.Sprintf("%%s@%%-%ds", size-len(name+version.String())+4), name, version)
|
||
2 years ago
|
}
|