forked from sloum/spacewalk
Adds output when launching a flight
This commit is contained in:
parent
af2324d3c4
commit
a05eff2a51
10
main.go
10
main.go
|
@ -209,7 +209,7 @@ func retrieve(addr string) (string, error) {
|
|||
noprot := strings.Replace(addr, "gemini://", "", 1)
|
||||
hostResource := strings.SplitN(noprot, "/", 2)
|
||||
if strings.LastIndex(hostResource[0], ":") == -1 {
|
||||
hostResource[0] = hostResource[0] + "1965"
|
||||
hostResource[0] = hostResource[0] + ":1965"
|
||||
}
|
||||
conf := &tls.Config{
|
||||
InsecureSkipVerify: true,
|
||||
|
@ -253,10 +253,12 @@ func checkForUpdate(c []string, r chan []string) {
|
|||
}
|
||||
|
||||
if chksum == c[2] {
|
||||
fmt.Printf("%s has no changes\n", c[0])
|
||||
r <- c
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Printf("UPDATED: %s\n", c[0])
|
||||
c[2] = chksum
|
||||
currentTime := time.Now()
|
||||
c[3] = currentTime.Format("2006-01-02")
|
||||
|
@ -417,7 +419,7 @@ func del(flight, item string) {
|
|||
}
|
||||
|
||||
if !removed {
|
||||
fmt.Printf("%q was not found in the flight log for \033[1m%s\033[0m", item, flight)
|
||||
fmt.Printf("%q was not found in the flight log for \033[1m%s\033[0m\n", item, flight)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -428,7 +430,7 @@ func del(flight, item string) {
|
|||
func launchFlights() {
|
||||
fmt.Println("Pre-flight check")
|
||||
records := readManifest()
|
||||
fmt.Printf("Launching all flights (%d)", len(records))
|
||||
fmt.Printf("Launching all flights (%d)\n", len(records))
|
||||
for _, fl := range records {
|
||||
launchFlight(fl[0])
|
||||
}
|
||||
|
@ -482,7 +484,7 @@ func launchFlight(flight string) {
|
|||
}
|
||||
defer f.Close()
|
||||
f.Write(out.Bytes())
|
||||
fmt.Printf("---> %s has been launched.", flight)
|
||||
fmt.Printf("---> %s has been launched.\n", flight)
|
||||
}
|
||||
|
||||
func showFlights(flight string) {
|
||||
|
|
Loading…
Reference in New Issue