Page Menu
Home
Musing Studio
Search
Configure Global Search
Log In
Files
F13894481
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
View Options
diff --git a/modules/auth/auth.go b/modules/auth/auth.go
deleted file mode 100644
index 4f17546..0000000
--- a/modules/auth/auth.go
+++ /dev/null
@@ -1,25 +0,0 @@
-package auth
-
-import (
- uuid "github.com/nu7hatch/gouuid"
- "strings"
-
- "code.as/writeas/web/modules/log"
-)
-
-// GetToken parses out the user token from an Authorization header.
-func GetToken(header string) []byte {
- var accessToken []byte
- if len(header) > 0 {
- f := strings.Fields(header)
- if len(f) == 2 && f[0] == "Token" {
- t, err := uuid.ParseHex(f[1])
- if err != nil {
- log.Error("Couldn't parseHex on '%s': %v", accessToken, err)
- } else {
- accessToken = t[:]
- }
- }
- }
- return accessToken
-}
diff --git a/modules/log/log.go b/modules/log/log.go
deleted file mode 100644
index 67fa597..0000000
--- a/modules/log/log.go
+++ /dev/null
@@ -1,28 +0,0 @@
-// log holds loggers for the application
-package log
-
-import (
- "log"
- "os"
-)
-
-var (
- i *log.Logger
- e *log.Logger
-)
-
-// Init creates the local loggers used in the app.
-func Init() {
- i = log.New(os.Stdout, "", log.Ldate|log.Ltime)
- e = log.New(os.Stderr, "ERROR: ", log.Ldate|log.Ltime|log.Lshortfile)
-}
-
-// Info logs an informational message to Stdout.
-func Info(s string, v ...interface{}) {
- i.Printf(s, v)
-}
-
-// Error logs an error to Stderr.
-func Error(s string, v ...interface{}) {
- e.Printf(s, v)
-}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Fri, Mar 13, 12:46 AM (1 d, 10 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3653814
Attached To
rWF WriteFreely
Event Timeline
Log In to Comment