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
🔫 Counter-Strike 2 🕘 1530 hrs 43 mins | |
🔫 Tom Clancy's Rainbow Six Siege 🕘 391 hrs 51 mins | |
🎮 Apex Legends 🕘 207 hrs 50 mins | |
🦾 Cyberpunk 2077 🕘 142 hrs 13 mins | |
🎮 Watch_Dogs 2 🕘 133 hrs 0 mins |
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
func main() { | |
fmt.Println(test1()) | |
fmt.Println(test2()) | |
fmt.Println(test3()) | |
fmt.Println(test4()) | |
return | |
} | |
func test1() (v int) { |
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
package main | |
import ( | |
"fmt" | |
"sync" | |
) | |
var ( | |
callback map[string]func() | |
mu sync.Mutex |
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
addEventListener("fetch", (event) => { | |
event.respondWith(handleRequest(event.request)); | |
}); | |
async function handleRequest(request) { | |
const url = new URL(request.url); | |
const fetchAPI = request.url.replace(url.host, 'api.openai.com'); | |
// 部分代理工具,请求又浏览器发起,跨域请求时会先发送一个 preflight 进行检查,也就是 OPTIONS 请求 | |
// 需要响应该请求,否则后续的 POST 会失败 |