rpaste/modules/paste/fpaste.go

32 lines
669 B
Go

// support for fpaste
package paste
import (
"fmt"
"os/user"
)
var (
fpasteTimeMap = map[string]string{
"1hour": "60",
"1day": "1440",
"1week": "10080",
}
fpasteAPIKey = "5uZ30dTZE1a5V0WYhNwcMddBRDpk6UzuzMu-APKM38iMHacxdA0n4vCqA34avNyt"
fpasteUserAgent = "fpaste/0.4.0.0"
fpasteTitle = "UNTITLED" // we'll need to make this changeable in the future
fpastePrivate = "1"
fpasteUserName = "user"
)
func Fpaste(life string, lexer string, fileContent string) error {
// Set username as the author
user, err := user.Current()
if err != nil {
fmt.Println("Username could not be found")
} else {
fpasteUserName = user.Name
}
return nil
}