Golang basics commands, functions, etc.
- Visual Studio Code or other IDE (Integrated Development Environment);
- Golang;
The following technologies are critical for running/compiling application sources:
- Access the application directory from the terminal and execute:
- Install the gorilla/mux:
go get -u github.com/gorilla/mux
Basic Go Commands
go run .\basics-go\main.go
REST web service
go run .\rest\main.go
-
Find all contact: [GET] - http://localhost:8080/contact
-
Find contact by ID: [GET] - http://localhost:8080/contact/3
-
Create a new contact: [POST] - http://localhost:8080/contact
Body Request: { "ID": 5, "Firstname": "Felipe", "Lastname": "Sulzbach", "Address": { "City": "Seattle", "State": "Washington" } }
-
Delete a contact: [DELETE] - http://localhost:8080/contact/3