summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2022-03-16 20:54:19 +0100
committerxengineering <me@xengineering.eu>2022-03-17 09:38:08 +0100
commit77901bb05dbf75e92dd8974ccb23053bb3b2dabf (patch)
tree386cfb941cb338d82ea607f28334705ce4c9d83e /main.go
parent8742e1207eb12091eeb061485072dcc2d70c0a52 (diff)
downloadstlscope-77901bb05dbf75e92dd8974ccb23053bb3b2dabf.tar
stlscope-77901bb05dbf75e92dd8974ccb23053bb3b2dabf.tar.zst
stlscope-77901bb05dbf75e92dd8974ccb23053bb3b2dabf.zip
Add docstrings
Diffstat (limited to 'main.go')
-rw-r--r--main.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/main.go b/main.go
index 9c45241..672bb8d 100644
--- a/main.go
+++ b/main.go
@@ -1,5 +1,7 @@
// vim: shiftwidth=4 tabstop=4 noexpandtab
+// stlscope is a file viewer for the STL file format. It is based on Go
+// and OpenGL.
package main
import (
@@ -9,11 +11,13 @@ import (
"io/ioutil"
)
+// cliArgs contains all data given via command line arguments.
type cliArgs struct {
filePath string
debugOutput bool
}
+// main represents the whole functionality of stlscope.
func main() {
// read command line arguments and mute log if necessary
@@ -50,6 +54,7 @@ func main() {
}
}
+// read reads the command line arguments given to stlscope to a cliArgs struct.
func (args *cliArgs) read() {
flag.BoolVar(&args.debugOutput, "debug", false,
"enable to print log output")