Moved distro information to the right of the distro ascii
This commit is contained in:
parent
469e704610
commit
23cdf358b0
22
main.go
22
main.go
@ -88,10 +88,23 @@ func readConfig() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// Print Distro Ascii
|
// Print Distro Information
|
||||||
fmt.Println(getDistroAscii())
|
ascii := getDistroAscii()
|
||||||
// Print Fetch Script Output
|
maxWidth := 0
|
||||||
fmt.Println(string(out))
|
for _, line := range strings.Split(ascii, "\n") {
|
||||||
|
if len(line) > maxWidth {
|
||||||
|
maxWidth = len(line)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for lineIndex, line := range strings.Split(ascii, "\n") {
|
||||||
|
for i := len(line); i < maxWidth+5; i++ {
|
||||||
|
line = line + " "
|
||||||
|
}
|
||||||
|
if lineIndex < len(strings.Split(string(out), "\n")) {
|
||||||
|
line = line + strings.Split(string(out), "\n")[lineIndex]
|
||||||
|
}
|
||||||
|
fmt.Println(line)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func readKeyValueFile(filepath string) (map[string]string, error) {
|
func readKeyValueFile(filepath string) (map[string]string, error) {
|
||||||
@ -174,7 +187,6 @@ func getDistroAscii() string {
|
|||||||
(| | )
|
(| | )
|
||||||
/'\_ _/'\
|
/'\_ _/'\
|
||||||
\___)=(___/ `
|
\___)=(___/ `
|
||||||
fmt.Println(path.Join(asciiPath, getDistroInfo().ID))
|
|
||||||
if _, err := os.Stat(path.Join(asciiPath, getDistroInfo().ID)); err == nil {
|
if _, err := os.Stat(path.Join(asciiPath, getDistroInfo().ID)); err == nil {
|
||||||
bytes, err := os.ReadFile(path.Join(asciiPath, getDistroInfo().ID))
|
bytes, err := os.ReadFile(path.Join(asciiPath, getDistroInfo().ID))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user