WithPlatform allows the caller to specify a platform to retrieve content for
(platform string)
| 135 | // WithPlatform allows the caller to specify a platform to retrieve |
| 136 | // content for |
| 137 | func WithPlatform(platform string) RemoteOpt { |
| 138 | if platform == "" { |
| 139 | platform = platforms.DefaultString() |
| 140 | } |
| 141 | return func(_ *Client, c *RemoteContext) error { |
| 142 | if slices.Contains(c.Platforms, platform) { |
| 143 | return nil |
| 144 | } |
| 145 | |
| 146 | c.Platforms = append(c.Platforms, platform) |
| 147 | return nil |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | // WithPlatformMatcher specifies the matcher to use for |
| 152 | // determining which platforms to pull content for. |
no outgoing calls
searching dependent graphs…