More logs

This commit is contained in:
Roman Dyakov 2023-11-09 20:52:45 +03:00
parent b2ad811b00
commit 1871008582
No known key found for this signature in database
GPG Key ID: 178F5D228F3BB574
1 changed files with 2 additions and 1 deletions

View File

@ -46,7 +46,9 @@ func NewClient(serverURL, token, giteapages, giteapagesAllowAll string) (*Client
}
func (c *Client) Open(name, ref string) (fs.File, error) {
fmt.Printf("Before split '%s'\n", name)
owner, repo, filepath := splitName(name)
fmt.Printf("After split owner='%s' repo='%s' filepath='%s'\n", owner, repo, filepath)
// if repo is empty they want to have the gitea-pages repo
if repo == "" {
@ -129,7 +131,6 @@ func (c *Client) getRawFileOrLFS(owner, repo, filepath, ref string) ([]byte, err
// TODO: make pr for go-sdk
// gitea sdk doesn't support "media" type for lfs/non-lfs
giteaURL, err = url.JoinPath(c.serverURL+"/api/v1/repos/", owner, repo, "media", filepath)
fmt.Errorf("Try to get file '%s'\n", giteaURL)
fmt.Printf("Try to get file '%s'\n", giteaURL)
if err != nil {
return nil, err