Skip to content

Commit

Permalink
Merge pull request #68 from csunibo/go-module
Browse files Browse the repository at this point in the history
config as a go module
  • Loading branch information
lucat1 authored Jun 24, 2024
2 parents a257d0c + e86580c commit 2d5922d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/csunibo/config

go 1.22.4
17 changes: 17 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package config

import (
"embed"
"io/fs"
)

//go:embed *.json
var content embed.FS

func Open(path string) (fs.File, error) {
return content.Open(path)
}

func ReadFile(path string) ([]byte, error) {
return content.ReadFile(path)
}

0 comments on commit 2d5922d

Please sign in to comment.