
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
github.com/zaccaron07/goexpert-weather-api-lab01
Advanced tools
Uma API REST em Go que recebe um CEP brasileiro, identifica a cidade e retorna o clima atual (temperatura em Celsius, Fahrenheit e Kelvin). Construída com clean architecture e pronta para deploy no Google Cloud Run.
WEATHER_API_KEY: Sua chave da WeatherAPI (obrigatória)Defina a variável de ambiente:
$env:WEATHER_API_KEY="sua_chave_aqui"; go run ./cmd/lab01
WEATHER_API_KEY=sua_chave_aqui go run ./cmd/lab01
.env (apenas para desenvolvimento local):
WEATHER_API_KEY=sua_chave_aqui
E use github.com/joho/godotenv se quiser carregá-la automaticamente.Execute os testes com cobertura:
go test ./... -coverprofile=coverage.out
go tool cover -func=coverage
go tool cover -html=coverage
Build da imagem:
podman build -t goexpert-weather-api .
# ou
docker build -t goexpert-weather-api .
Execute o container:
podman run --rm -p 8080:8080 -e WEATHER_API_KEY=sua_chave_aqui goexpert-weather-api
# ou
docker run --rm -p 8080:8080 -e WEATHER_API_KEY=sua_chave_aqui goexpert-weather-api
GET /zipcode/{zipcode}/weather{ "temp_C": 28.5, "temp_F": 83.3, "temp_K": 301.65 }invalid zipcodecan not find zipcodecmd/lab01/ — Ponto de entrada principalinternal/entity/ — Entidades de domínio e interfacesinternal/infra/repo/ — Repositórios de APIs externasinternal/infra/web/ — Handlers HTTP e servidor webinternal/usecase/ — Casos de uso da aplicaçãohttps://goexpert-weather-api-lab-01-516049214932.us-central1.run.app/zipcode/88820000/weather
FAQs
Unknown package
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.