ForeachSetting runs fn for each setting. It stops and returns the first error.
(fn func(http2.Setting) error)
| 869 | // ForeachSetting runs fn for each setting. |
| 870 | // It stops and returns the first error. |
| 871 | func (f *SettingsFrame) ForeachSetting(fn func(http2.Setting) error) error { |
| 872 | f.checkValid() |
| 873 | for i := 0; i < f.NumSettings(); i++ { |
| 874 | if err := fn(f.Setting(i)); err != nil { |
| 875 | return err |
| 876 | } |
| 877 | } |
| 878 | return nil |
| 879 | } |
| 880 | |
| 881 | // WriteSettings writes a SETTINGS frame with zero or more settings |
| 882 | // specified and the ACK bit not set. |
no test coverage detected