github.com/a1rchina/a1rchina v0.0.0-20260716081636-e0182021b5e8
GitHub Actions workflow definition pathReference guide has multiple section headings
SHA-256e61af97cfa79429201ec7949c3c74b79769e6e36be9f8c0688926997d8673f94
MaleculeH(Cm)Md₂(Bk)
Evidence
1package main
2
3import (
4 "encoding/json"
5 "fmt"
6 "io/ioutil"
7 "net/http"
8 "time"
9)
10
11type CryptoPrice struct {
12 USD float64 `json:"usd"`
13 USD_24H_CHANGE float64 `json:"usd_24h_ch …
16:11… oData map[string]CryptoPrice
17
18func main() {
19 // 获取加密货币价格和24小时变化
20 url := "https://api.coingecko.com/api/v3/simple/price?ids=bitcoin,ethereum&vs_currencies=usd&include_24hr_change=true"
21 resp, err := http.Get(url)
22 if err != nil {
23 fmt.Println("Error fetching data:", err)
⋯5 lines
30:49… rr)
31 return
32 }
33
34 var data CryptoData
35 if err := json.Unmarshal(body, &data); err != nil {
36 fmt.Println("Error decoding JSON:", err)
37 return
38 }
39
40 // 生成动态 README 内容,使用 Emoji 和格式优化
41 content := fmt.Sprintf(`# Crypto Trader Profile 🚀
42
43Hey there! I'm a passionate **Crypto Trader** riding the blockchain waves 🌊!
44
45## 🌟 Live Market Snapshot
46*Last Updated: %s* ⏰
47
48| Coin | Price (USD) | Trend |
49|------------|----------------|--------|
50| **Bitcoin (BTC)** � …
69:104… eum"].USD_24H_CHANGE),
70)
71
72 // 写入 README.md
73 if err := ioutil.WriteFile("README.md", []byte(content), 0644); err != nil {
74 fmt.Println("Error writing to README:", err)
75 }
⋯17 lines
⋯9 lines
10 runs-on: ubuntu-latest
11 steps:
12 - uses: actions/checkout@v3
13 - name: Set up Go
14 uses: actions/setup-go@v3
⋯11 lines
No evidence locations were recorded for this file. Raw result