11 lines
372 B
Go
Raw Normal View History

package cloudflare
2022-08-02 23:49:42 +09:00
2022-09-13 23:18:17 +09:00
import "github.com/syumai/workers/internal/jsutil"
2022-08-03 00:02:03 +09:00
// Getenv gets a value of an environment variable.
2022-08-03 00:19:01 +09:00
// - https://developers.cloudflare.com/workers/platform/environment-variables/
// - Technically, this function is just an alias for js.Global().Get(env_name).String().
2022-08-02 23:49:42 +09:00
func Getenv(name string) string {
2022-09-13 23:18:17 +09:00
return jsutil.Global.Get(name).String()
2022-08-02 23:49:42 +09:00
}