feat: replace text/template with templ and refactor code
This commit is contained in:
16
data/proxy.go
Normal file
16
data/proxy.go
Normal file
@ -0,0 +1,16 @@
|
||||
package data
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/url"
|
||||
)
|
||||
|
||||
func ExtractImageURL(image string) string {
|
||||
u, err := url.Parse(image)
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return fmt.Sprintf("/images%s", u.Path)
|
||||
}
|
||||
|
Reference in New Issue
Block a user