Store your Minecraft configs with your other dotfiles, and load it automatically.
1package modrinth
2
3import (
4 "encoding/json"
5 "io"
6 "net/http"
7)
8
9func fetchProject(name string, id string) *Project {
10 var project *Project
11 url := "https://api.modrinth.com/v2/project/" + id
12 res, _ := http.Get(url)
13 if (res.StatusCode == 404) {
14 return project
15 }
16 body, _ := io.ReadAll(res.Body)
17 json.Unmarshal(body, &project)
18 return project
19}