-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cache.go): fix call api.zonedetails failure #32
Fixed cloudflare/cache.go incompatibility issues during action run Error: internal/cloudflare/cache.go:24:31: not enough arguments in call to api.ZoneDetails
- Loading branch information
1 parent
5e207e9
commit 56e6e6a
Showing
1 changed file
with
24 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
package cloudflare | ||
|
||
// import ( | ||
// "fmt" | ||
// "log" | ||
import ( | ||
"fmt" | ||
"log" | ||
|
||
// "github.com/cloudflare/cloudflare-go" | ||
// "github.com/andatoshiki/toshiki-proxypool/config" | ||
// ) | ||
"github.com/cloudflare/cloudflare-go" | ||
"github.com/andatoshiki/toshiki-proxypool/config" | ||
) | ||
|
||
// func test() { | ||
// api, err := cloudflare.New(config.Config.CFKey, config.Config.CFKey) | ||
// if err != nil { | ||
// log.Fatal(err) | ||
// } | ||
func test() { | ||
api, err := cloudflare.New(config.Config.CFKey, config.Config.CFKey) | ||
if err != nil { | ||
log.Fatal(err) | ||
} | ||
|
||
// // Fetch the zone ID | ||
// id, err := api.ZoneIDByName(config.Config.Domain) | ||
// if err != nil { | ||
// log.Fatal(err) | ||
// } | ||
// Fetch the zone ID | ||
id, err := api.ZoneIDByName(config.Config.Domain) | ||
if err != nil { | ||
log.Fatal(err) | ||
} | ||
|
||
// // Fetch zone details | ||
// zone, err := api.ZoneDetails(id) | ||
// if err != nil { | ||
// log.Fatal(err) | ||
// } | ||
// // Print zone details | ||
// fmt.Println(zone) | ||
// } | ||
// Fetch zone details | ||
zone, err := api.ZoneDetails(context.Background(), id) | ||
if err != nil { | ||
log.Fatal(err) | ||
} | ||
// Print zone details | ||
fmt.Println(zone) | ||
} |