strip trailing / from REMARK_URL

https://github.com/umputun/remark/issues/289#issuecomment-474030504
This commit is contained in:
Umputun
2019-03-18 13:04:21 -05:00
parent 034101fb64
commit 83de28c2da
+1 -1
View File
@@ -33,7 +33,7 @@ type CommonOpts struct {
// SetCommon satisfies CommonOptionsCommander interface and sets common option fields
// The method called by main for each command
func (c *CommonOpts) SetCommon(commonOpts CommonOpts) {
c.RemarkURL = commonOpts.RemarkURL
c.RemarkURL = strings.TrimSuffix(commonOpts.RemarkURL, "/") // allow RemarkURL with trailing /
c.SharedSecret = commonOpts.SharedSecret
c.Revision = commonOpts.Revision
}