Skip to content

Commit 5eba305

Browse files
committed
cryptsetup: build alternative for non-Linux systems
1 parent 0ccdf51 commit 5eba305

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Copyright 2025 Edgeless Systems GmbH
2+
// SPDX-License-Identifier: BUSL-1.1
3+
4+
//go:build !linux
5+
6+
package cryptsetup
7+
8+
import "context"
9+
10+
// IsExt4 is not implemented for non-Linux systems.
11+
func (d *Device) IsExt4(context.Context) (bool, error) {
12+
panic("GOOS does not support cryptesetup")
13+
}
14+
15+
// MkfsExt4 is not implemented for non-Linux systems.
16+
func (d *Device) MkfsExt4(context.Context) error {
17+
panic("GOOS does not support cryptesetup")
18+
}

internal/cryptsetup/ext4.go renamed to internal/cryptsetup/ext4_linux.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// Copyright 2025 Edgeless Systems GmbH
22
// SPDX-License-Identifier: BUSL-1.1
33

4+
//go:build linux
5+
46
package cryptsetup
57

68
import (

0 commit comments

Comments
 (0)