feat: remove borders to make it easy to copy

This commit is contained in:
asrul10
2023-04-09 10:25:50 +07:00
parent 148e1d9420
commit 0e50c8ec04
4 changed files with 5 additions and 21 deletions

11
main.go
View File

@@ -10,7 +10,6 @@ import (
"time"
"github.com/asrul/linux-command-gpt/gpt"
"golang.org/x/term"
)
const (
@@ -59,10 +58,6 @@ func handleCommand(cmd string) int {
}
func main() {
width, _, err := term.GetSize(0)
if err != nil {
panic(err)
}
currentUser, err := user.Current()
if err != nil {
panic(err)
@@ -131,11 +126,9 @@ func main() {
c := "Y"
elapsed := time.Since(s).Seconds()
elapsed = math.Round(elapsed*100) / 100
fmt.Printf("Completed in %v seconds\n", elapsed)
fmt.Println(strings.Repeat("─", width))
fmt.Printf("Completed in %v seconds\n\n", elapsed)
fmt.Println(r)
fmt.Println(strings.Repeat("─", width))
fmt.Print("Are you sure you want to execute the command? (Y/n): ")
fmt.Print("\nAre you sure you want to execute the command? (Y/n): ")
fmt.Scanln(&c)
if c != "Y" && c != "y" {
return