forked from sloum/spacewalk
Merge branch 'master' of https://tildegit.org/sloum/spacewalk
This commit is contained in:
commit
04c115663e
10
main.go
10
main.go
|
@ -218,7 +218,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,
|
||||
|
@ -262,10 +262,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")
|
||||
|
@ -450,7 +452,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
|
||||
}
|
||||
|
||||
|
@ -461,7 +463,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])
|
||||
}
|
||||
|
@ -515,7 +517,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