Building with GOOS=windows fails because tpm2.go:217 calls tpm2.OpenTPM("/dev/tpmrm0"), but the go-tpm library's Windows signature takes no arguments.
# github.com/anatol/clevis.go
tpm2.go:217:22: too many arguments in call to tpm2.OpenTPM
have (string)
want ()
Potential fix: add //go:build !windows to tpm2.go and provide a tpm2_windows.go with stub implementations that return an "unsupported" error, or gate the OpenTPM call behind a platform check.
Building with
GOOS=windowsfails becausetpm2.go:217callstpm2.OpenTPM("/dev/tpmrm0"), but thego-tpmlibrary's Windows signature takes no arguments.Potential fix: add
//go:build !windowstotpm2.goand provide atpm2_windows.gowith stub implementations that return an "unsupported" error, or gate theOpenTPMcall behind a platform check.