mirror of
https://github.com/mudler/luet.git
synced 2025-08-14 13:33:51 +00:00
20 lines
362 B
Go
20 lines
362 B
Go
package winlayers
|
|
|
|
import "context"
|
|
|
|
type contextKeyT string
|
|
|
|
var contextKey = contextKeyT("buildkit/winlayers-on")
|
|
|
|
func UseWindowsLayerMode(ctx context.Context) context.Context {
|
|
return context.WithValue(ctx, contextKey, true)
|
|
}
|
|
|
|
func hasWindowsLayerMode(ctx context.Context) bool {
|
|
v := ctx.Value(contextKey)
|
|
if v == nil {
|
|
return false
|
|
}
|
|
return true
|
|
}
|