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:
Manuel Rüger 2026-03-12 23:15:58 +01:00
parent 1fc553f102
commit d68f8c3bb3

View File

@ -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
}
}