segmentio / golines

A golang formatter that fixes long lines
MIT License
903 stars 56 forks source link

Long lines in interfaces inside structs are not broken down #126

Open noomly opened 4 months ago

noomly commented 4 months ago

Golines doesn't do anything when ran on the following piece of code:

type MyStruct struct {
    LongInterface interface {
        SuperLongFunctionName(anArgument string, anotherReallyLongArgument string, superDuperLongArgument string, definitelyTheLongestArgument string) error
    }
}

My expectation was for it to format it this way:

type MyStruct struct {
    LongInterface interface {
        SuperLongFunctionName(
            anArgument string,
            anotherReallyLongArgument string,
            superDuperLongArgument string,
            definitelyTheLongestArgument string,
        ) error
    }
}