mirror of
https://github.com/unidoc/unioffice.git
synced 2025-04-27 13:48:54 +08:00
common: fix some lint issues
This commit is contained in:
parent
c38bb81110
commit
e74c739f40
@ -68,9 +68,6 @@ func (c ContentTypes) EnsureOverride(path, contentType string) {
|
|||||||
for _, ovr := range c.x.Override {
|
for _, ovr := range c.x.Override {
|
||||||
// found one, so just ensure the content type matches and bail
|
// found one, so just ensure the content type matches and bail
|
||||||
if ovr.PartNameAttr == path {
|
if ovr.PartNameAttr == path {
|
||||||
if !strings.HasPrefix(path, "/") {
|
|
||||||
path = "/" + path
|
|
||||||
}
|
|
||||||
if strings.HasPrefix(contentType, "http") {
|
if strings.HasPrefix(contentType, "http") {
|
||||||
gooxml.Log("content type '%s' is incorrect, must not start with http", contentType)
|
gooxml.Log("content type '%s' is incorrect, must not start with http", contentType)
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ func (c CoreProperties) X() *core_properties.CoreProperties {
|
|||||||
return c.x
|
return c.x
|
||||||
}
|
}
|
||||||
|
|
||||||
// ContentStatus returns the category of the document
|
// Category returns the category of the document
|
||||||
func (c CoreProperties) Category() string {
|
func (c CoreProperties) Category() string {
|
||||||
if c.x.Category != nil {
|
if c.x.Category != nil {
|
||||||
return *c.x.Category
|
return *c.x.Category
|
||||||
@ -51,7 +51,7 @@ func (c CoreProperties) ContentStatus() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetCategory records the category of the document.
|
// SetContentStatus records the content status of the document.
|
||||||
func (c CoreProperties) SetContentStatus(s string) {
|
func (c CoreProperties) SetContentStatus(s string) {
|
||||||
c.x.ContentStatus = &s
|
c.x.ContentStatus = &s
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,7 @@ func (i ImageRef) Path() string {
|
|||||||
return i.img.Path
|
return i.img.Path
|
||||||
}
|
}
|
||||||
|
|
||||||
// Path returns the path to an image file
|
// Size returns the size of an image
|
||||||
func (i ImageRef) Size() image.Point {
|
func (i ImageRef) Size() image.Point {
|
||||||
return i.img.Size
|
return i.img.Size
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user