feat: add system config item for reward image, add app config item to use custom text2img param json file

This commit is contained in:
RockYang
2023-10-08 17:48:50 +08:00
parent 0270ec26fb
commit fbd599194c
9 changed files with 296 additions and 131 deletions

View File

@@ -2,16 +2,13 @@ package main
import (
"fmt"
"net/url"
"path"
"os"
)
func main() {
imgURL := "https://www.baidu.com/static/upload/2023/10/1696497571220711277.png?ex=6530f4a2&is=651e7fa28hmFd709d069ca05d7855ebdae42e5aa436883a36f9310d546"
parse, err := url.Parse(imgURL)
bytes, err := os.ReadFile("res/text2img.json")
if err != nil {
panic(err)
}
fmt.Println(path.Ext(parse.Path))
fmt.Println(string(bytes))
}