From 15ddd66e6b3d8f2a1532f55405e816827ae19e86 Mon Sep 17 00:00:00 2001 From: Chris Koch Date: Thu, 15 Feb 2024 04:54:05 +0000 Subject: [PATCH] WithBinaryCommandsOpts Signed-off-by: Chris Koch --- uimage/uimage.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/uimage/uimage.go b/uimage/uimage.go index 11fbf4d..49e7ff7 100644 --- a/uimage/uimage.go +++ b/uimage/uimage.go @@ -378,6 +378,14 @@ func WithBinaryCommands(cmd ...string) Modifier { return WithCommands(nil, builder.Binary, cmd...) } +// WithBinaryCommandsOpts adds Go commands to compile as individual binaries +// and add to the archive. +// +// Allowed formats for cmd are documented in [WithCommands]. +func WithBinaryCommandsOpts(gbOpts *golang.BuildOpts, cmd ...string) Modifier { + return WithCommands(gbOpts, builder.Binary, cmd...) +} + // WithOutput sets the archive output file. func WithOutput(w initramfs.WriteOpener) Modifier { return func(o *Opts) error {