about summary refs log tree commit diff stats
path: root/cache.go
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2020-05-09 01:37:10 -0400
committerBen Morrison <ben@gbmor.dev>2020-05-09 01:37:10 -0400
commitdd81555e6d53c36525358d620d25a9ab042cc9ae (patch)
treeee833ced000a2dac579d838dc002dc2bf1d81c4c /cache.go
parent21633380cd3010423821a78d34db2c0fb4a740a7 (diff)
downloadapi-dd81555e6d53c36525358d620d25a9ab042cc9ae.tar.gz
consolidated osversion functions to osversion.go
Diffstat (limited to 'cache.go')
-rw-r--r--cache.go24
1 files changed, 0 insertions, 24 deletions
diff --git a/cache.go b/cache.go
index 24744f6..c7a68b7 100644
--- a/cache.go
+++ b/cache.go
@@ -1,7 +1,6 @@
 package main
 
 import (
-	"fmt"
 	"io/ioutil"
 	"log"
 	"strings"
@@ -117,29 +116,6 @@ func bapIndex() {
 	}
 }
 
-func bapOSVersion(format string) {
-	path := fmt.Sprintf("/%s/osversion", format)
-	unNullPage(path)
-
-	if cache.isFresh(path) {
-		return
-	}
-
-	bytes, err := osVersionQuery(format)
-	if err != nil {
-		log.Printf("Could not query OS version: %s", err.Error())
-		bytes = []byte("Internal Error")
-	}
-
-	cache.Lock()
-	defer cache.Unlock()
-
-	cache.pages[path] = &page{
-		raw:     bytes,
-		expires: time.Now().Add(cacheDuration),
-	}
-}
-
 func bapPkgs(format string)      {}
 func bapQuery(format string)     {}
 func bapUptime(format string)    {}