https://github.com/coderclub-dev/whoamigo
Who am I, Go?
https://github.com/coderclub-dev/whoamigo
beginner beginner-project golang hacktoberfest hacktoberfest2022
Last synced: 1 day ago
JSON representation
Who am I, Go?
- Host: GitHub
- URL: https://github.com/coderclub-dev/whoamigo
- Owner: coderclub-dev
- Created: 2019-10-13T20:03:02.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-09-05T02:42:42.000Z (almost 6 years ago)
- Last Synced: 2026-05-02T20:39:34.849Z (about 2 months ago)
- Topics: beginner, beginner-project, golang, hacktoberfest, hacktoberfest2022
- Language: Go
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Who am I, Go?
Simple HTTP project written in [Go](https://golang.org/)
See other _**Who am I?**_ options
- [Who am I, Node?](https://github.com/marcopollivier/whoaminode)
- [Who am I, Java?](https://github.com/marcopollivier/whoamijava)
- [Who am I, Clojure?](https://github.com/marcopollivier/whoamiclojure)
## Run locally
### Execute the server
```bash
$ go run cmd/server/main.go
```
### Execute the CURL command
```bash
$ curl http://localhost:8081 | json_pp
```
## Docker
### Build Docker image
```bash
$ docker build -t marcopollivier/whoami:go-latest .
```
or [Download the Docker Image](https://hub.docker.com/r/marcopollivier/whoami)
### Push Docker Image
```bash
$ docker push marcopollivier/whoami:go-latest
```
### Run Docker container
```bash
$ docker run --name whoami_go -d -p 8081:8081 marcopollivier/whoami:go-latest
```
## API REST
### Response
- **me**: hostname (container ID for example)
- **timestamp**: execution start time
```json
{
"me": "RJ-MB2680.lan",
"timestamp": "2019-02-12T10:00:00.000Z"
}
```