-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
49 lines (40 loc) · 2.05 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
package main
import (
TDAHash "main/Hash"
"main/lectura"
user "main/usuarios"
"bufio"
"os"
"strings"
)
var usuarios = os.Args[1]
var Posts = TDAHash.CrearHash[int, user.Post]() // [clave = ID: valor = POST]
var Users = TDAHash.CrearHash[string, user.Usuario]() // [clave = nombre: valor = Usuario]
func main() {
lista_Usuarios := lectura.LeerUsuarios(usuarios)
for index, nombre := range lista_Usuarios {
Users.Guardar(nombre, user.CrearUsuario(nombre, index))
}
var UsuarioActivo string
var ContadorPost int
S := bufio.NewScanner(os.Stdin)
for S.Scan() {
lectura.LecturaDeComandos(strings.Fields(S.Text()), Users, Posts, &UsuarioActivo, &ContadorPost)
}
}
/*
⠄⠄⠄⠄⠄⠄⠄⢀⣟⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⢔⢙⣷⡄⠄⠄⠄⠈⣿⣿⣿
⠄⠄⠄⠄⠄⢠⡎⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⣿⣿⣧⡄⠄⠄⠄⢸⣇⡚
⠄⠄⠄⠄⢀⣣⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡆⠄⠄⢸⣧⣽
⠄⠄⠄⠚⠛⠿⠿⠿⣿⣿⣿⠿⠛⠛⠛⠿⣿⣿⣿⣿⣿⣿⣿⠿⠿⠿⢿⣧⠄⢠⠾⠿⢿
⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠉⠄⠄⠄⠄⠄⠉⠉⠛⠛⠉⠉⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⢸
⠄⠄⢸⣇⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⣠⣤⡄⠄⠄⠄⠄⠄⠄⠄⠄⠄⢰⣶⣾
⣿⣄⣿⣿⣧⡀⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⣴⣿⣿⣿⠄⠄⠄⠄⠄⠄⠄⠄⢀⣼⣿⣿
⣿⣿⣿⣿⣿⣿⣷⣶⣤⣤⣀⣀⣀⣀⣀⣠⣾⣿⣿⣿⣿⣧⠄⠄⠄⠄⢀⣀⣰⠲⠶⠶⠰
⡿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣿⣿⣿⣿⣿⡇⡐⠲⠴⣦
⠄⠈⣿⣿⣿⣿⣿⣿⣿⣿⣟⣿⣿⣿⣿⣯⡛⠛⠿⡿⠿⠛⠋⠄⠙⠋⠉⠁⣤⢸⣅⣤⢸
⠄⠄⠸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣤⡀⠄⢀⣀⣀⠄⠄⠄⠄⠈⠁⠉⠄⠄⠈
⠄⠄⢰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣛⣛⠛⠛⠛⠉⣁⣀⡔⠄⠄⠄⠄⠄⠄⢰⣶
⠄⢀⣾⣿⣿⡿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠿⠛⢉⣿⣿⠟⠄⠈⠄⠄⠄⠄⠄⠘⠛
⣴⣿⣿⣿⣿⣿⣎⢻⣿⣿⣿⣿⣿⣿⣿⣿⣧⣀⣠⣤⣾⣿⡿⠄⠄⠄MESSIRVE
*/