https://github.com/nazuke/gofar
A small program to learn some Go by finding the aspect ratio of a rectangle of a given width and height.
https://github.com/nazuke/gofar
Last synced: 5 months ago
JSON representation
A small program to learn some Go by finding the aspect ratio of a rectangle of a given width and height.
- Host: GitHub
- URL: https://github.com/nazuke/gofar
- Owner: nazuke
- License: mit
- Created: 2020-04-14T13:40:14.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-14T13:46:00.000Z (about 6 years ago)
- Last Synced: 2024-03-18T09:10:39.658Z (about 2 years ago)
- Language: Go
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Find Aspect Ratio
A small program to learn some Go by finding the aspect ratio of a rectangle of a given width and height.
## Compiling
The executable is output in the `bin` directory, and will be named `gofar` or `gofar.exe`.
There are also `tasks.json` and `launch.json` files for VS Code users.
### Unix-like
sh build.sh
### Windows
build.cmd
## Usage
gofar -width=1920 -height=1080 [-nonewline]
This should output:
16:9
Specifying the `-nonewline` flag will omit the newline from the output, making it simpler to pipe the result into something else.