Skip to content

conorheffron/shopping-cart-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

shopping-cart-go

Go Build

Quality gate

Sonar Scan & Test Coverage - Overall Summary

Tech

  • Go 1.24, gocover-cobertura, SonarQube

Build / Install

go build

Run Tests

go test -v

Run API App

go run main.go
OR
./shopping-cart-go

POST Request to Add Item 1

curl -X POST -H "Content-Type: application/json" -d '{"id":1,"name":"Laptop","price":999.99}' http://localhost:8080/add

{"id":1,"name":"Laptop","price":999.99}

POST Request to Add Item 2

curl -X POST -H "Content-Type: application/json" -d '{"id":2,"name":"basketball","price":77.99}' http://localhost:8080/add

{"id":2,"name":"basketball","price":77.99}

GET Items

curl http://localhost:8080/cart

[{"id":1,"name":"Laptop","price":999.99},{"id":2,"name":"basketball","price":77.99}]

About

Sample App to manage shopping cart (add item, view cart)

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages