fix lint error

This commit is contained in:
Natasha Sarkar
2021-03-02 14:39:23 -08:00
parent 57e7db0423
commit af1e692a5e
4 changed files with 26 additions and 7 deletions

View File

@@ -169,13 +169,13 @@ func (m Merger) SetComments(sources walk.Sources) error {
// avoid panic
return nil
}
if source != nil && source.YNode().FootComment != "" {
if source.YNode().FootComment != "" {
dest.YNode().FootComment = source.YNode().FootComment
}
if source != nil && source.YNode().HeadComment != "" {
if source.YNode().HeadComment != "" {
dest.YNode().HeadComment = source.YNode().HeadComment
}
if source != nil && source.YNode().LineComment != "" {
if source.YNode().LineComment != "" {
dest.YNode().LineComment = source.YNode().LineComment
}
return nil