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)
|
noprot := strings.Replace(addr, "gemini://", "", 1)
|
||||||
hostResource := strings.SplitN(noprot, "/", 2)
|
hostResource := strings.SplitN(noprot, "/", 2)
|
||||||
if strings.LastIndex(hostResource[0], ":") == -1 {
|
if strings.LastIndex(hostResource[0], ":") == -1 {
|
||||||
hostResource[0] = hostResource[0] + "1965"
|
hostResource[0] = hostResource[0] + ":1965"
|
||||||
}
|
}
|
||||||
conf := &tls.Config{
|
conf := &tls.Config{
|
||||||
InsecureSkipVerify: true,
|
InsecureSkipVerify: true,
|
||||||
|
@ -253,10 +253,12 @@ func checkForUpdate(c []string, r chan []string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if chksum == c[2] {
|
if chksum == c[2] {
|
||||||
|
fmt.Printf("%s has no changes\n", c[0])
|
||||||
r <- c
|
r <- c
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fmt.Printf("UPDATED: %s\n", c[0])
|
||||||
c[2] = chksum
|
c[2] = chksum
|
||||||
currentTime := time.Now()
|
currentTime := time.Now()
|
||||||
c[3] = currentTime.Format("2006-01-02")
|
c[3] = currentTime.Format("2006-01-02")
|
||||||
|
@ -417,7 +419,7 @@ func del(flight, item string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if !removed {
|
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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -428,7 +430,7 @@ func del(flight, item string) {
|
||||||
func launchFlights() {
|
func launchFlights() {
|
||||||
fmt.Println("Pre-flight check")
|
fmt.Println("Pre-flight check")
|
||||||
records := readManifest()
|
records := readManifest()
|
||||||
fmt.Printf("Launching all flights (%d)", len(records))
|
fmt.Printf("Launching all flights (%d)\n", len(records))
|
||||||
for _, fl := range records {
|
for _, fl := range records {
|
||||||
launchFlight(fl[0])
|
launchFlight(fl[0])
|
||||||
}
|
}
|
||||||
|
@ -482,7 +484,7 @@ func launchFlight(flight string) {
|
||||||
}
|
}
|
||||||
defer f.Close()
|
defer f.Close()
|
||||||
f.Write(out.Bytes())
|
f.Write(out.Bytes())
|
||||||
fmt.Printf("---> %s has been launched.", flight)
|
fmt.Printf("---> %s has been launched.\n", flight)
|
||||||
}
|
}
|
||||||
|
|
||||||
func showFlights(flight string) {
|
func showFlights(flight string) {
|
||||||
|
|
Loading…
Reference in New Issue