How to: [⏫](#contents) :gift: Detect missing cascade calls with [go-lint-cascade](https://github.com/nikolaydubina/go-lint-cascade)
For example, if you have cascade calls for WithDefaults() in nested config structs, this linter will detect if you missed any WithDefaults() calls. — [@nikolaydubina](https://github.com/nikolaydubina)

```
go-lint-cascade ./...
```

```go
type Config struct {
    DB DBConfig
}

func (s Config) WithDefaults() Config {
    // ERROR: Missing s.DB = s.DB.WithDefaults()
    return s
}

type DBConfig struct {
    Port int
}

func (s DBConfig) WithDefaults() DBConfig { 
    if s.Port == 0 {
        s.Port = 42
    }
    return s
}
```

Requirements
```
go install github.com/nikolaydubina/go-lint-cascade@latest
```