
Security News
Django Joins curl in Pushing Back on AI Slop Security Reports
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
github.com/cloudflare/cloudflare-go
Note: This library is under active development as we expand it to cover our (expanding!) API. Consider the public API of this package a little unstable as we work towards a v1.0.
A Go library for interacting with Cloudflare's API v4. This library allows you to:
A command-line client, flarectl, is also available as part of this project.
You need a working Go environment. We officially support only currently supported Go versions according to Go project's release policy.
go get github.com/cloudflare/cloudflare-go
package main
import (
"context"
"fmt"
"log"
"os"
"github.com/cloudflare/cloudflare-go"
)
func main() {
// Construct a new API object using a global API key
api, err := cloudflare.New(os.Getenv("CLOUDFLARE_API_KEY"), os.Getenv("CLOUDFLARE_API_EMAIL"))
// alternatively, you can use a scoped API token
// api, err := cloudflare.NewWithAPIToken(os.Getenv("CLOUDFLARE_API_TOKEN"))
if err != nil {
log.Fatal(err)
}
// Most API calls require a Context
ctx := context.Background()
// Fetch user details on the account
u, err := api.UserDetails(ctx)
if err != nil {
log.Fatal(err)
}
// Print user details
fmt.Println(u)
}
Also refer to the API documentation for how to use this package in-depth.
Pull Requests are welcome, but please open an issue (or comment in an existing issue) to discuss any non-trivial changes before submitting code.
BSD licensed. See the LICENSE file for details.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.