WithExcludeTypes returns an option for FilterImage that specifies the set of types that should be excluded from the filtered image. May be provided multiple times. The type names should be fully qualified. For example, "google.protobuf.Any" or "buf.validate". Types may be nested, and can be any pac
(typeNames ...string)
| 147 | // If the type does not exist in the image, an error wrapping |
| 148 | // [ErrImageFilterTypeNotFound] will be returned. |
| 149 | func WithExcludeTypes(typeNames ...string) ImageFilterOption { |
| 150 | return func(opts *imageFilterOptions) { |
| 151 | if len(typeNames) > 0 && opts.excludeTypes == nil { |
| 152 | opts.excludeTypes = make(map[string]struct{}, len(typeNames)) |
| 153 | } |
| 154 | for _, typeName := range typeNames { |
| 155 | opts.excludeTypes[typeName] = struct{}{} |
| 156 | } |
| 157 | } |
| 158 | } |
| 159 | |
| 160 | // WithMutateInPlace returns an option for FilterImage that specifies |
| 161 | // that the filtered image should be mutated in place. This option is useful when the |
no outgoing calls
searching dependent graphs…