Esses bugs estão acontecendo, a primeira e segunda vez que estava fazendo as aulas funcionou normalmente e pude dar continuidade as aulas, depois disso, parou de funcionar e de carregar no terminal, estão aparecendo as seguintes mensagens, já deleitei a pasta que era pra deletar, e continua dando erro:
PS C:\Users\maril\Desktop\alura\html curso\api_rest_gin_go-aula_5\api_rest_gin_go-aula_5> go run main.go
2024/02/23 15:43:20 C:/Users/maril/Desktop/alura/html curso/api_rest_gin_go-aula_5/api_rest_gin_go-aula_5/database/db.go:18
[error] failed to initialize database, got error failed to connect to `host=localhost user=root database=root`: dial error (dial tcp 127.0.0.1:5432: connectex: No connection could be made because the target machine actively refused it.)
2024/02/23 15:43:20 Erro ao conectar com banco de dados
panic: Erro ao conectar com banco de dados
goroutine 1 [running]:
log.Panic({0xc000499f10?, 0xc00006b1e0?, 0x0?})
C:/Program Files/Go/src/log/log.go:432 +0x5a
github.com/guilhermeonrails/api-go-gin/database.ConectaComBancoDeDados()
C:/Users/maril/Desktop/alura/html curso/api_rest_gin_go-aula_5/api_rest_gin_go-aula_5/database/db.go:20 +0xf5
main.main()
C:/Users/maril/Desktop/alura/html curso/api_rest_gin_go-aula_5/api_rest_gin_go-aula_5/main.go:9 +0xf
exit status 2
PS C:\Users\maril\Desktop\alura\html curso\api_rest_gin_go-aula_5\api_rest_gin_go-aula_5> docker-compose build
PS C:\Users\maril\Desktop\alura\html curso\api_rest_gin_go-aula_5\api_rest_gin_go-aula_5> docker-compose up
error during connect: this error may indicate that the docker daemon is not running: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/containers/json?all=1&filters=%7B%22label%22%3A%7B%22com.docker.compose.config-hash%22%3Atrue%2C%22com.docker.compose.project%3Dapi_rest_gin_go-aula_5%22%3Atrue%7D%7D": open //./pipe/docker_engine: The system cannot find the file specified.
PS C:\Users\maril\Desktop\alura\html curso\api_rest_gin_go-aula_5\api_rest_gin_go-aula_5>