MCPcopy Create free account
hub / github.com/imroc/req / ForeachSetting

Method ForeachSetting

internal/http2/frame.go:871–879  ·  view source on GitHub ↗

ForeachSetting runs fn for each setting. It stops and returns the first error.

(fn func(http2.Setting) error)

Source from the content-addressed store, hash-verified

869// ForeachSetting runs fn for each setting.
870// It stops and returns the first error.
871func (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.

Callers 2

summarizeFrameFunction · 0.80

Calls 3

NumSettingsMethod · 0.95
SettingMethod · 0.95
checkValidMethod · 0.80

Tested by

no test coverage detected