aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2023-12-14 20:20:20 +0100
committerJoe <rbo@gmx.us>2023-12-14 20:20:20 +0100
commit91d8524629f76f3a363615300159ff474ed6e39b (patch)
treedf5c1d0fe4fa8a733941c60fc66655356ae8b25d
parentup (diff)
downloadhardflip-91d8524629f76f3a363615300159ff474ed6e39b.tar.gz
hardflip-91d8524629f76f3a363615300159ff474ed6e39b.tar.bz2
hardflip-91d8524629f76f3a363615300159ff474ed6e39b.tar.xz
hardflip-91d8524629f76f3a363615300159ff474ed6e39b.tar.zst
hardflip-91d8524629f76f3a363615300159ff474ed6e39b.zip
up
Diffstat (limited to '')
-rw-r--r--c_init.go9
-rw-r--r--c_josh.go3
2 files changed, 9 insertions, 3 deletions
diff --git a/c_init.go b/c_init.go
index 37ab550..894b6c3 100644
--- a/c_init.go
+++ b/c_init.go
@@ -39,7 +39,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* josh: src/c_init.go
- * Thu, 14 Dec 2023 15:37:10 +0100
+ * Thu, 14 Dec 2023 15:41:22 +0100
* Joe
*
* init functions
@@ -50,6 +50,7 @@ package main
import (
"fmt"
"os"
+ "io/ioutil"
)
// This function will go get the data folder and try to create it if it does
@@ -78,3 +79,9 @@ func c_get_data_dir() string {
}
return *ptr
}
+
+func c_show_files(dir string) {
+ if _, err := ioutil.ReadDir(dir); err != nil {
+ c_die("could not read data directory", err)
+ }
+}
diff --git a/c_josh.go b/c_josh.go
index 451f837..ad61793 100644
--- a/c_josh.go
+++ b/c_josh.go
@@ -48,12 +48,11 @@
package main
import (
- "fmt"
)
func main() {
var data_dir string
data_dir = c_get_data_dir()
- fmt.Println("data dir: ", data_dir)
+ c_show_files(data_dir)
}