mirror of
https://github.com/kovetskiy/mark.git
synced 2026-03-14 06:07:36 +08:00
fix: use api.BaseURL instead of config.BaseURL for page URL output
confluence.NewAPI trims trailing slashes from the base URL into api.BaseURL. Using config.BaseURL directly could produce double slashes in the logged/printed URL when the caller passes a trailing-slash BaseURL. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
1fc553f102
commit
d68f8c3bb3
4
mark.go
4
mark.go
@ -115,8 +115,8 @@ func Run(config Config) error {
|
||||
}
|
||||
|
||||
if target != nil {
|
||||
log.Infof(nil, "page successfully updated: %s", config.BaseURL+target.Links.Full)
|
||||
if _, err := fmt.Fprintln(config.output(), config.BaseURL+target.Links.Full); err != nil {
|
||||
log.Infof(nil, "page successfully updated: %s", api.BaseURL+target.Links.Full)
|
||||
if _, err := fmt.Fprintln(config.output(), api.BaseURL+target.Links.Full); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user