func Module(name string) {
const (
txt = `File {{.Name}}`
)
type Module struct {
Module string
}
t := template.Must(template.New(name).Parse(txt))
r := Module{
Module: name,
}
f, err := os.Create("file.txt")
if err != nil {
log.Println(err)
}
defer f.Close()
if err := t.Execute(f, r); err != nil {
log.Println(err)
}
}
if encoded, err := utils.C.Encode("cookie-jar", value); err == nil {
token := fmt.Sprintf("Bearer %s", tokenString)
w.Header().Set("Authorization", token)
cookie := &http.Cookie{
Name: "cookie-jar",
Value: encoded,
Domain: ".localhost",
Path: "/",
Expires: expirationTime,
HttpOnly: true,
// Secure: true,
}
http.SetCookie(w, cookie)
}