github.com/nozzle/golangci-lint@v1.49.0-nz3/test/testdata/dupl.go (about) 1 //golangcitest:args -Edupl 2 //golangcitest:config_path testdata/configs/dupl.yml 3 package testdata 4 5 type DuplLogger struct{} 6 7 func (DuplLogger) level() int { 8 return 1 9 } 10 11 func (DuplLogger) Debug(args ...interface{}) {} 12 func (DuplLogger) Info(args ...interface{}) {} 13 14 func (logger *DuplLogger) First(args ...interface{}) { // want "14-23 lines are duplicate of `.*dupl.go:25-34`" 15 if logger.level() >= 0 { 16 logger.Debug(args...) 17 logger.Debug(args...) 18 logger.Debug(args...) 19 logger.Debug(args...) 20 logger.Debug(args...) 21 logger.Debug(args...) 22 } 23 } 24 25 func (logger *DuplLogger) Second(args ...interface{}) { // want "25-34 lines are duplicate of `.*dupl.go:14-23`" 26 if logger.level() >= 1 { 27 logger.Info(args...) 28 logger.Info(args...) 29 logger.Info(args...) 30 logger.Info(args...) 31 logger.Info(args...) 32 logger.Info(args...) 33 } 34 }