github.com/yoheimuta/protolint@v0.49.8-0.20240515023657-4ecaebb7575d/linter/autodisable/nextPlacementStrategy.go (about) 1 package autodisable 2 3 import "github.com/yoheimuta/go-protoparser/v4/parser" 4 5 type nextPlacementStrategy struct { 6 c *commentator 7 } 8 9 func newNextPlacementStrategy(c *commentator) *nextPlacementStrategy { 10 return &nextPlacementStrategy{ 11 c: c, 12 } 13 } 14 15 func (p *nextPlacementStrategy) Disable( 16 offset int, 17 _ []*parser.Comment, 18 _ *parser.Comment) { 19 p.c.insertNewline(offset) 20 } 21 22 func (p *nextPlacementStrategy) Finalize() error { 23 return p.c.finalize() 24 }