You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: metadata.go
+34-3
Original file line number
Diff line number
Diff line change
@@ -27,19 +27,34 @@ type Metadata struct {
27
27
typeLibraryReferences []LibraryReference
28
28
29
29
// FSs returns the filesystems of the library references, can be used with Alzlib.Init().
30
-
func (lrLibraryReferences) FSs() []fs.FS {
31
-
fss:=make([]fs.FS, len(lr))
32
-
fori, l:=rangelr {
30
+
func (mLibraryReferences) FSs() []fs.FS {
31
+
fss:=make([]fs.FS, len(m))
32
+
fori, l:=rangem {
33
33
fss[i] =l.FS()
34
34
}
35
35
returnfss
36
36
}
37
37
38
+
// FetchWithDependencies recursively fetches all the library references and their dependencies.
39
+
// The destination directory a hash value that will be appended to the `.alzlib` directory in the current working directory unless overridden by the `ALZLIB_DIR` environment variable.
// LibraryReference is an interface that represents a dependency of a library member.
39
53
// It can be fetched form either a custom go-getter URL or from the ALZ Library.
40
54
typeLibraryReferenceinterface {
41
55
fmt.Stringer
42
56
Fetch(ctx context.Context, desinationDirectorystring) (fs.FS, error) // Fetch fetches the library member to the `.alzlib/destinationDirectory`. Override the base dir using `ALZLIB_DIR` env var.
57
+
FetchWithDependencies(ctx context.Context) (LibraryReferences, error) // FetchWithDependencies fetches the library member and its dependencies.
43
58
FS() fs.FS// FS returns the filesystem of the library member, can be used in Alzlib.Init()
0 commit comments