notifications: add http config
All checks were successful
ci/woodpecker/push/go-lint Pipeline was successful

This commit is contained in:
2025-03-12 10:10:45 -05:00
parent 4d705d78fb
commit 6bef0c3e5b
7 changed files with 69 additions and 11 deletions

View File

@ -116,7 +116,7 @@ func (c *Cache) Set(source, hash string, data []byte, dataType string) (CacheDat
path := filepath.Join(c.dir, fmt.Sprintf("%s-%s", fileName, sourceHash))
if _, err := os.Stat(path); os.IsNotExist(err) {
os.MkdirAll(c.dir, 0700)
_ = os.MkdirAll(c.dir, 0700)
}
err := os.WriteFile(path, data, 0644)
@ -171,7 +171,7 @@ func (cf *CachedFetcher) Hash(data []byte) string {
func LoadMetadataFromFile(filePath string) ([]*CacheData, error) {
if _, err := os.Stat(filePath); os.IsNotExist(err) {
// Create the file if it does not exist
os.MkdirAll(path.Dir(filePath), 0700)
_ = os.MkdirAll(path.Dir(filePath), 0700)
emptyData := []byte("[]")
err := os.WriteFile(filePath, emptyData, 0644)
if err != nil {