-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdir.go
More file actions
27 lines (23 loc) · 716 Bytes
/
Copy pathdir.go
File metadata and controls
27 lines (23 loc) · 716 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package main
import (
"context"
"dagger/fedora/internal/dagger"
)
// DirectoryFromSource represents a Directory to be placed in the generated
// Container image at the Destination
type DirectoryFromSource struct {
Source *dagger.Directory
Destination string
}
// WithDirectory will upload the given Directory (directory) at the given destination
func (f *Fedora) WithDirectory(
ctx context.Context,
// path in Container image to place the source directory
destination string,
// directory to be uploaded to the Container image
directory *dagger.Directory,
) *Fedora {
dir := DirectoryFromSource{Source: directory, Destination: destination}
f.Directories = append(f.Directories, &dir)
return f
}