sif: limit platform to linux

Signed-off-by: Yannick Cote <ycote@redhat.com>
This commit is contained in:
Yannick Cote 2021-11-17 10:11:05 -05:00 committed by Miloslav Trmač
parent 9b33dd16c3
commit 1757663cc4
11 changed files with 36 additions and 2 deletions

View File

@ -1,3 +1,5 @@
// +build linux
package internal
import (

View File

@ -5,6 +5,8 @@
// LICENSE file distributed with the sources of this project regarding your
// rights to use or distribute this software.
// +build linux
package sif
import (

View File

@ -5,6 +5,8 @@
// LICENSE file distributed with the sources of this project regarding your
// rights to use or distribute this software.
// +build linux
package sif
import (

View File

@ -5,6 +5,8 @@
// LICENSE file distributed with the sources of this project regarding your
// rights to use or distribute this software.
// +build linux
package sif
import (

View File

@ -5,6 +5,8 @@
// LICENSE file distributed with the sources of this project regarding your
// rights to use or distribute this software.
// +build linux
package sif
import (

View File

@ -5,6 +5,8 @@
// LICENSE file distributed with the sources of this project regarding your
// rights to use or distribute this software.
// +build linux
// Package sif implements data structures and routines to create
// and access SIF files.
// - sif.go contains the data definition the file format.
@ -18,8 +20,9 @@ package sif
import (
"bytes"
"github.com/satori/go.uuid"
"os"
uuid "github.com/satori/go.uuid"
)
// Layout of a SIF file (example)

View File

@ -1,3 +1,5 @@
// +build linux
package sifimage
import (

View File

@ -1,3 +1,5 @@
// +build linux
package sifimage
import (

View File

@ -12,9 +12,9 @@ import (
_ "github.com/containers/image/v5/oci/archive"
_ "github.com/containers/image/v5/oci/layout"
_ "github.com/containers/image/v5/openshift"
_ "github.com/containers/image/v5/sif"
_ "github.com/containers/image/v5/tarball"
// The sif transport is registered by sif*.go
// The ostree transport is registered by ostree*.go
// The storage transport is registered by storage*.go
"github.com/containers/image/v5/transports"

View File

@ -0,0 +1,8 @@
// +build linux
package alltransports
import (
// Register the sif transport
_ "github.com/containers/image/v5/sif"
)

View File

@ -0,0 +1,9 @@
// +build !linux
package alltransports
import "github.com/containers/image/v5/transports"
func init() {
transports.Register(transports.NewStubTransport("sif"))
}