Aucune description

main.go 1016B

    package main import ( "log" "net/http" "os" "time" ) var ( EnvironmentVariables = map[string]string{ "LOOP_URL": "localhost:6006", "LOOP_SALT": "whatyoutalkingaboutwillus", "LOOP_BASE": ".", } ) func ConfigureEnvironment() { for key, value := range EnvironmentVariables { env := os.Getenv(key) if env == "" && value != "" { os.Setenv(key, value) } } } func main() { log.Print("Configuring environment...") ConfigureEnvironment() //http.HandleFunc("/", DefaultHandler) log.Fatal(http.ListenAndServe(address(), nil)) } func address() string { return os.Getenv("LOOP_URL") } func validateCredentials(username, password, salt string) bool { return false } func createUser(username string) (string, error) { return "", nil } func createContent(username string) (string, error) { return "", nil } func addContent(content, filename string, file []byte) (string, error) { return "", nil } func publishContent(title, content string, date time.Time) (string, error) { return "", nil }