move workers.Getenv to cloudflare.Getenv

This commit is contained in:
syumai 2022-11-19 23:11:19 +09:00
parent e3348b4ccd
commit 09b132f026
2 changed files with 4 additions and 2 deletions

View File

@ -1,4 +1,4 @@
package workers
package cloudflare
import "github.com/syumai/workers/internal/jsutil"

View File

@ -4,12 +4,14 @@ import (
"fmt"
"net/http"
"github.com/syumai/workers/cloudflare"
"github.com/syumai/workers"
)
func main() {
handler := http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
fmt.Fprintf(w, "MY_ENV: %s", workers.Getenv("MY_ENV"))
fmt.Fprintf(w, "MY_ENV: %s", cloudflare.Getenv("MY_ENV"))
})
workers.Serve(handler)
}