Browse Source

details about GetFeature

pull/865/head
Darien Raymond 7 years ago
parent
commit
42e9af63aa
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
  1. 1
      v2ray.go

1
v2ray.go

@ -164,6 +164,7 @@ func (s *Instance) RegisterFeature(feature interface{}, instance Feature) error
}
// GetFeature returns a feature that was registered in this Instance. Nil if not found.
// The returned Feature must implement common.HasType and whose type equals the given feature type.
func (s *Instance) GetFeature(featureType interface{}) Feature {
for _, f := range s.features {
if hasType, ok := f.(common.HasType); ok {

Loading…
Cancel
Save