-
Notifications
You must be signed in to change notification settings - Fork 4
/
main.go
57 lines (51 loc) · 1.06 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package main
import (
"time"
"fmt"
)
type Hito struct {
URI string
Title string
fecha time.Time
}
var hitos = []Hito {
Hito {
URI: "0.Repositorio",
Title: "Datos básicos y repo",
fecha: time.Date(2020, time.September, 29, 11, 30, 0, 0, time.UTC),
},
Hito {
URI: "1.Infraestructura",
Title: "HUs y entidad principal",
fecha: time.Date(2020, time.October, 6, 11, 30, 0, 0, time.UTC),
},
Hito {
URI: "2.Tests",
Title: "Tests iniciales",
fecha: time.Date(2020, time.October, 16, 11, 30, 0, 0, time.UTC),
},
Hito {
URI: "3.Contenedores",
Title: "Contenedores",
fecha: time.Date(2020, time.October, 26, 11, 30, 0, 0, time.UTC),
},
Hito {
URI: "4.CI",
Title: "Integración continua",
fecha: time.Date(2020, time.November, 6, 23, 59, 0, 0, time.UTC),
},
}
func main() {
currentTime := time.Now()
var next int
var queda time.Duration
for indice, hito := range hitos {
if ( hito.fecha.After( currentTime ) ) {
next = indice
queda = hito.fecha.Sub( currentTime )
}
}
if ( next > 0) {
fmt.Println( next, queda, hitos[next] )
}
}