Get returns all extensions of the specified type.
(typ ExtensionType)
| 85 | |
| 86 | // Get returns all extensions of the specified type. |
| 87 | func Get(typ ExtensionType) map[string]*Extension { |
| 88 | mx.RLock() |
| 89 | defer mx.RUnlock() |
| 90 | |
| 91 | exts, ok := extensions[typ] |
| 92 | if !ok { |
| 93 | panic(fmt.Sprintf("unsupported extension type: %T", typ)) |
| 94 | } |
| 95 | |
| 96 | result := make(map[string]*Extension, len(exts)) |
| 97 | |
| 98 | maps.Copy(result, exts) |
| 99 | |
| 100 | return result |
| 101 | } |
| 102 | |
| 103 | // GetAll returns all extensions, sorted by their import path and name. |
| 104 | func GetAll() []*Extension { |
no outgoing calls