From e5e3c595215fe94f15b36c7ac98b274cc43e52a0 Mon Sep 17 00:00:00 2001 From: 2vb Date: Wed, 29 May 2024 00:30:33 -0700 Subject: [PATCH] :) --- storage/embeds.go | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/storage/embeds.go b/storage/embeds.go index 828fa1c..338c91c 100644 --- a/storage/embeds.go +++ b/storage/embeds.go @@ -3,11 +3,8 @@ package storage import ( "embed" "encoding/json" - "io" - "net/http" + "os" "strings" - - "github.com/ectrc/snow/aid" ) var ( @@ -29,15 +26,15 @@ func Asset(file string) (*[]byte) { } func HttpAsset[T interface{}](file string) (*T) { - client := http.Client{} + // client := http.Client{} - resp, err := client.Get(aid.Config.API.Host + "/snow/httpassets/" + file) // resp, err := client.Get("https://raw.githubusercontent.com/ectrc/ectrc/main/" + file) - if err != nil { - return nil - } + // if err != nil { + // return nil + // } - data, err := io.ReadAll(resp.Body) + data, err := os.ReadFile("./data/" + file) + // data, err := io.ReadAll(resp.Body) if err != nil { return nil }