AptModule struct

Configuration for an APT module

Fields:

  • Name (string) - json:"name"
  • Type (string) - json:"type"
  • Options (AptOptions) - json:"options"
  • Source (api.Source) - json:"source"

AptOptions struct

Options for APT package management

Fields:

  • NoRecommends (bool) - json:"no_recommends"
  • InstallSuggests (bool) - json:"install_suggests"
  • FixMissing (bool) - json:"fix_missing"
  • FixBroken (bool) - json:"fix_broken"

PlugInfo function

Provide plugin information as a JSON string

Returns:

  • *C.char
Show/Hide Function Body
{
	plugininfo := &api.PluginInfo{Name: "apt", Type: api.BuildPlugin}
	pluginjson, err := json.Marshal(plugininfo)
	if err != nil {
		return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
	}
	return C.CString(string(pluginjson))
}

BuildModule function

Generate an apt-get install command from the provided module and recipe.

Handle package installation and apply appropriate options.

Parameters:

  • moduleInterface *C.char
  • recipeInterface *C.char

Returns:

  • *C.char
Show/Hide Function Body
{
	var module *AptModule
	var recipe *api.Recipe

	err := json.Unmarshal([]byte(C.GoString(moduleInterface)), &module)
	if err != nil {
		return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
	}

	err = json.Unmarshal([]byte(C.GoString(recipeInterface)), &recipe)
	if err != nil {
		return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
	}

	args := ""
	if module.Options.NoRecommends {
		args += "--no-install-recommends "
	}
	if module.Options.InstallSuggests {
		args += "--install-suggests "
	}
	if module.Options.FixMissing {
		args += "--fix-missing "
	}
	if module.Options.FixBroken {
		args += "--fix-broken "
	}

	if len(module.Source.Packages) > 0 {
		packages := ""
		for _, pkg := range module.Source.Packages {
			packages += pkg + " "
		}

		return C.CString(fmt.Sprintf("apt-get install -y %s %s && apt-get clean", args, packages))
	}

	if len(module.Source.Paths) > 0 {
		cmd := ""

		for i, path := range module.Source.Paths {
			instPath := filepath.Join(recipe.ParentPath, path+".inst")
			packages := ""
			file, err := os.Open(instPath)
			if err != nil {
				return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
			}
			defer file.Close()

			scanner := bufio.NewScanner(file)
			for scanner.Scan() {
				packages += scanner.Text() + " "
			}

			if err := scanner.Err(); err != nil {
				return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
			}

			cmd += fmt.Sprintf("apt-get install -y %s %s", args, packages)

			if i != len(module.Source.Paths)-1 {
				cmd += "&& "
			} else {
				cmd += "&& apt-get clean"
			}
		}

		return C.CString(cmd)
	}

	return C.CString("ERROR: no packages or paths specified")
}

main function

Show/Hide Function Body
{}

CMakeModule struct

Configuration for a CMake module

Fields:

  • Name (string) - json:"name"
  • Type (string) - json:"type"
  • BuildVars (map[string]string) - json:"buildvars"
  • BuildFlags (string) - json:"buildflags"
  • Source (api.Source)

PlugInfo function

Provide plugin information as a JSON string

Returns:

  • *C.char
Show/Hide Function Body
{
	plugininfo := &api.PluginInfo{Name: "cmake", Type: api.BuildPlugin}
	pluginjson, err := json.Marshal(plugininfo)
	if err != nil {
		return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
	}
	return C.CString(string(pluginjson))
}

BuildModule function

Generate a shell command to build a CMake project based on the provided module and recipe.

Download and move the source, set up build variables and flags, and construct the CMake build command.

Parameters:

  • moduleInterface *C.char
  • recipeInterface *C.char

Returns:

  • *C.char
Show/Hide Function Body
{
	var module *CMakeModule
	var recipe *api.Recipe

	err := json.Unmarshal([]byte(C.GoString(moduleInterface)), &module)
	if err != nil {
		return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
	}

	err = json.Unmarshal([]byte(C.GoString(recipeInterface)), &recipe)
	if err != nil {
		return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
	}

	err = api.DownloadSource(recipe.DownloadsPath, module.Source, module.Name)
	if err != nil {
		return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
	}
	err = api.MoveSource(recipe.DownloadsPath, recipe.SourcesPath, module.Source, module.Name)
	if err != nil {
		return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
	}
	buildVars := map[string]string{}
	for k, v := range module.BuildVars {
		buildVars[k] = v
	}

	buildFlags := ""
	if module.BuildFlags != "" {
		buildFlags = " " + module.BuildFlags
	}

	cmd := fmt.Sprintf(
		"cd /sources/%s && mkdir -p build && cd build && cmake ..%s && make",
		filepath.Join(recipe.SourcesPath, api.GetSourcePath(module.Source, module.Name)),
		buildFlags,
	)

	return C.CString(cmd)
}

main function

Show/Hide Function Body
{ fmt.Println("This plugin is not meant to run standalone!") }

DpkgBuildModule struct

Configuration for building a Debian package using dpkg

Fields:

  • Name (string) - json:"name"
  • Type (string) - json:"type"
  • Source (api.Source)

PlugInfo function

Provide plugin information as a JSON string

Returns:

  • *C.char
Show/Hide Function Body
{
	plugininfo := &api.PluginInfo{Name: "dpkg-buildpackage", Type: api.BuildPlugin}
	pluginjson, err := json.Marshal(plugininfo)
	if err != nil {
		return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
	}
	return C.CString(string(pluginjson))
}

BuildModule function

Generate a command to build a Debian package using dpkg and install

the resulting .deb package. Handle downloading, moving the source,

and running dpkg-buildpackage with appropriate options.

Parameters:

  • moduleInterface *C.char
  • recipeInterface *C.char

Returns:

  • *C.char
Show/Hide Function Body
{
	var module *DpkgBuildModule
	var recipe *api.Recipe

	err := json.Unmarshal([]byte(C.GoString(moduleInterface)), &module)
	if err != nil {
		return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
	}

	err = json.Unmarshal([]byte(C.GoString(recipeInterface)), &recipe)
	if err != nil {
		return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
	}

	err = api.DownloadSource(recipe.DownloadsPath, module.Source, module.Name)
	if err != nil {
		return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
	}
	err = api.MoveSource(recipe.DownloadsPath, recipe.SourcesPath, module.Source, module.Name)
	if err != nil {
		return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
	}

	cmd := fmt.Sprintf(
		"cd /sources/%s && dpkg-buildpackage -d -us -uc -b",
		filepath.Join(api.GetSourcePath(module.Source, module.Name)),
	)

	for _, path := range module.Source.Paths {
		cmd += fmt.Sprintf(" && apt install -y --allow-downgrades ../%s*.deb", path)
	}

	cmd += " && apt clean"
	return C.CString(cmd)
}

main function

Show/Hide Function Body
{ fmt.Println("This plugin is not meant to run standalone!") }

innerFlatpakModule struct

Configuration for managing Flatpak repositories and packages

Fields:

  • Repourl (string) - json:"repo-url"
  • Reponame (string) - json:"repo-name"
  • Install ([]string) - json:"install"
  • Remove ([]string) - json:"remove"

FlatpakModule struct

Configuration for managing Flatpak repositories and packages

for both system and user contexts

Fields:

  • Name (string) - json:"name"
  • Type (string) - json:"type"
  • System (innerFlatpakModule) - json:"system"
  • User (innerFlatpakModule) - json:"user"

PlugInfo function

Provide plugin information as a JSON string

Returns:

  • *C.char
Show/Hide Function Body
{
	plugininfo := &api.PluginInfo{Name: "flatpak", Type: api.BuildPlugin}
	pluginjson, err := json.Marshal(plugininfo)
	if err != nil {
		return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
	}
	return C.CString(string(pluginjson))
}

createRepo function

Generate a command to add a Flatpak remote repository.

Add appropriate flags for system-wide or user-specific installation.

Parameters:

  • module innerFlatpakModule
  • isSystem bool

Returns:

  • string

References:

Show/Hide Function Body
{
	fmt.Println("Adding remote ", isSystem, " ", module)
	command := "flatpak remote-add --if-not-exists"
	if isSystem {
		command = fmt.Sprintf("%s --system", command)
	} else {
		command = fmt.Sprintf("%s --user", command)
	}
	return fmt.Sprintf("%s %s %s", command, module.Reponame, module.Repourl)
}

BuildModule function

Generate setup commands for Flatpak module configuration.

Create scripts for system-wide and user-specific Flatpak setups,

including repository addition, package installation, and service configuration.

Parameters:

  • moduleInterface *C.char
  • recipeInterface *C.char

Returns:

  • *C.char
Show/Hide Function Body
{
	var module *FlatpakModule
	var recipe *api.Recipe

	err := json.Unmarshal([]byte(C.GoString(moduleInterface)), &module)
	if err != nil {
		return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
	}

	err = json.Unmarshal([]byte(C.GoString(recipeInterface)), &recipe)
	if err != nil {
		return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
	}

	os.MkdirAll(path.Join(recipe.ParentPath, "includes.container/usr/bin/"), 0o775)
	if module.System.Reponame != "" {
		syscommands := "#!/usr/bin/env sh"
		if module.System.Repourl != "" {
			syscommands = fmt.Sprintf("%s\n%s", syscommands, createRepo(module.System, true))
			fmt.Println(syscommands)
		}
		if len(module.System.Install) != 0 {
			syscommands = fmt.Sprintf("%s\nflatpak install --system --noninteractive %s %s", syscommands, module.System.Reponame, strings.Join(module.System.Install, " "))
		}
		if len(module.System.Remove) != 0 {
			syscommands = fmt.Sprintf("%s\nflatpak uninstall --system --noninteractive %s %s", syscommands, module.User.Reponame, strings.Join(module.System.Remove, " "))
		}

		syscommands = fmt.Sprintf("%s\nsystemctl disable flatpak-system-setup.service", syscommands)
		err := os.WriteFile(path.Join(recipe.ParentPath, "includes.container/usr/bin/system-flatpak-setup"), []byte(syscommands), 0o777)
		if err != nil {
			return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
		}

	}
	if module.User.Reponame != "" {
		usercommands := "#!/usr/bin/env sh"
		if module.User.Repourl != "" {
			usercommands = fmt.Sprintf("%s\n%s", usercommands, createRepo(module.User, false))
			fmt.Println(usercommands)
		}
		if len(module.User.Install) != 0 {
			usercommands = fmt.Sprintf("%s\nflatpak install --user --noninteractive %s", usercommands, strings.Join(module.User.Install, " "))
		}
		if len(module.User.Remove) != 0 {
			usercommands = fmt.Sprintf("%s\nflatpak uninstall --user --noninteractive %s", usercommands, strings.Join(module.User.Remove, " "))
		}

		err := os.WriteFile(path.Join(recipe.ParentPath, "includes.container/usr/bin/user-flatpak-setup"), []byte(usercommands), 0o777)
		if err != nil {
			return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
		}
	}
	os.MkdirAll(path.Join(recipe.ParentPath, "includes.container/etc/systemd/user"), 0o775)
	os.MkdirAll(path.Join(recipe.ParentPath, "includes.container/etc/systemd/system"), 0o775)
	os.WriteFile(path.Join(recipe.ParentPath, "includes.container/etc/systemd/user/flatpak-user-setup.service"), []byte(UserService), 0o666)
	os.WriteFile(path.Join(recipe.ParentPath, "includes.container/etc/systemd/system/flatpak-system-setup.service"), []byte(SystemService), 0o666)

	return C.CString("systemctl enable --global flatpak-user-setup.service && systemctl enable --system flatpak-system-setup.service")
}

main function

Show/Hide Function Body
{ fmt.Println("This plugin is not meant to run standalone!") }

GoModule struct

Configuration for building a Go module

Fields:

  • Name (string) - json:"name"
  • Type (string) - json:"type"
  • Source (api.Source)
  • BuildVars (map[string]string)
  • BuildFlags (string)

PlugInfo function

Provide plugin information as a JSON string

Returns:

  • *C.char
Show/Hide Function Body
{
	plugininfo := &api.PluginInfo{Name: "go", Type: api.BuildPlugin}
	pluginjson, err := json.Marshal(plugininfo)
	if err != nil {
		return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
	}
	return C.CString(string(pluginjson))
}

BuildModule function

Generate a command to build a Go project. Add options for

setting the output binary name and location based on the provided buildVars

and BuildFlags, and handle downloading and moving the source.

Parameters:

  • moduleInterface *C.char
  • recipeInterface *C.char

Returns:

  • *C.char
Show/Hide Function Body
{
	var module *GoModule
	var recipe *api.Recipe

	err := json.Unmarshal([]byte(C.GoString(moduleInterface)), &module)
	if err != nil {
		return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
	}

	err = json.Unmarshal([]byte(C.GoString(recipeInterface)), &recipe)
	if err != nil {
		return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
	}

	err = api.DownloadSource(recipe.DownloadsPath, module.Source, module.Name)
	if err != nil {
		return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
	}
	err = api.MoveSource(recipe.DownloadsPath, recipe.SourcesPath, module.Source, module.Name)
	if err != nil {
		return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
	}

	buildVars := map[string]string{}
	for k, v := range module.BuildVars {
		buildVars[k] = v
	}

	buildFlags := ""
	if module.BuildFlags != "" {
		buildFlags = " " + module.BuildFlags
	}

	buildVars["GO_OUTPUT_BIN"] = module.Name
	if module.BuildVars["GO_OUTPUT_BIN"] != "" {
		buildVars["GO_OUTPUT_BIN"] = module.BuildVars["GO_OUTPUT_BIN"]
	}

	cmd := fmt.Sprintf(
		"cd /sources/%s && go build%s -o %s",
		api.GetSourcePath(module.Source, module.Name),
		buildFlags,
		buildVars["GO_OUTPUT_BIN"],
	)

	return C.CString(cmd)
}

main function

Show/Hide Function Body
{ fmt.Println("This plugin is not meant to run standalone!") }

MakeModule struct

Configuration for building a project using Make

Fields:

  • Name (string) - json:"name"
  • Type (string) - json:"type"
  • BuildCommand (string) - json:"buildcommand"
  • InstallCommand (string) - json:"installcommand"
  • IntermediateSteps ([]string) - json:"intermediatesteps"
  • Source (api.Source)

PlugInfo function

Provide plugin information as a JSON string

Returns:

  • *C.char
Show/Hide Function Body
{
	plugininfo := &api.PluginInfo{Name: "make", Type: api.BuildPlugin}
	pluginjson, err := json.Marshal(plugininfo)
	if err != nil {
		return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
	}
	return C.CString(string(pluginjson))
}

BuildModule function

Generate a command to build a Make project. Change directory

to the source path, run 'make' to build the project, and 'make install'

to install the built project. Handle downloading and moving the source.

Parameters:

  • moduleInterface *C.char
  • recipeInterface *C.char

Returns:

  • *C.char
Show/Hide Function Body
{
	var module *MakeModule
	var recipe *api.Recipe

	err := json.Unmarshal([]byte(C.GoString(moduleInterface)), &module)
	if err != nil {
		return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
	}

	err = json.Unmarshal([]byte(C.GoString(recipeInterface)), &recipe)
	if err != nil {
		return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
	}

	err = api.DownloadSource(recipe.DownloadsPath, module.Source, module.Name)
	if err != nil {
		return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
	}
	err = api.MoveSource(recipe.DownloadsPath, recipe.SourcesPath, module.Source, module.Name)
	if err != nil {
		return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
	}

	buildCommand := "make"
	installCommand := "make install"
	intermediateSteps := " && "

	if len(strings.TrimSpace(module.BuildCommand)) != 0 {
		buildCommand = module.BuildCommand
	}

	if len(strings.TrimSpace(module.InstallCommand)) != 0 {
		installCommand = module.InstallCommand
	}

	if len(module.IntermediateSteps) != 0 {
		intermediateSteps = " && " + strings.Join(module.IntermediateSteps, " && ") + " && "
	}

	cmd := "cd /sources/" + api.GetSourcePath(module.Source, module.Name) + " && " + buildCommand + intermediateSteps + installCommand
	return C.CString(cmd)
}

main function

Show/Hide Function Body
{ fmt.Println("This plugin is not meant to run standalone!") }

MesonModule struct

Configuration for building a Meson project

Fields:

  • Name (string)
  • Type (string)
  • BuildFlags ([]string) - json:"buildflags"
  • Source (api.Source)

PlugInfo function

Provide plugin information as a JSON string

Returns:

  • *C.char
Show/Hide Function Body
{
	plugininfo := &api.PluginInfo{Name: "meson", Type: api.BuildPlugin}
	pluginjson, err := json.Marshal(plugininfo)
	if err != nil {
		return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
	}
	return C.CString(string(pluginjson))
}

BuildModule function

Generate a command to build a Meson project. Handle source downloading, moving,

and use Meson and Ninja build tools with a temporary build directory based on the checksum.

Parameters:

  • moduleInterface *C.char
  • recipeInterface *C.char

Returns:

  • *C.char
Show/Hide Function Body
{
	var module *MesonModule
	var recipe *api.Recipe

	err := json.Unmarshal([]byte(C.GoString(moduleInterface)), &module)
	if err != nil {
		return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
	}

	err = json.Unmarshal([]byte(C.GoString(recipeInterface)), &recipe)
	if err != nil {
		return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
	}

	err = api.DownloadSource(recipe.DownloadsPath, module.Source, module.Name)
	if err != nil {
		return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
	}
	err = api.MoveSource(recipe.DownloadsPath, recipe.SourcesPath, module.Source, module.Name)
	if err != nil {
		return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
	}

	// Since the downloaded source goes through checksum verification already
	// it is safe to simply use the specified checksum from the module definition
	tmpDir := fmt.Sprintf("/tmp/%s-%s", module.Source.Checksum, module.Name)
	cmd := fmt.Sprintf(
		"cd /sources/%s && meson %s %s && ninja -C %s && ninja -C %s install",
		api.GetSourcePath(module.Source, module.Name),
		strings.Join(module.BuildFlags, " "),
		tmpDir,
		tmpDir,
		tmpDir,
	)

	return C.CString(cmd)
}

main function

Show/Hide Function Body
{ fmt.Println("This plugin is not meant to run standalone!") }

ShimModule struct

Configuration for a shim module

Fields:

  • Name (string) - json:"name"
  • Type (string) - json:"type"
  • ShimType (string) - json:"shimtype"

PlugInfo function

Provide plugin information as a JSON string

Returns:

  • *C.char
Show/Hide Function Body
{
	plugininfo := &api.PluginInfo{Name: "shim", Type: api.BuildPlugin}
	pluginjson, err := json.Marshal(plugininfo)
	if err != nil {
		return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
	}
	return C.CString(string(pluginjson))
}

BuildModule function

Generate a command to build a shim module. Create temporary directories,

write module and recipe data to files, and execute the plugin command with

the paths to these files.

Parameters:

  • moduleInterface *C.char
  • recipeInterface *C.char

Returns:

  • *C.char
Show/Hide Function Body
{
	var module *ShimModule
	var recipe *api.Recipe

	err := json.Unmarshal([]byte(C.GoString(moduleInterface)), &module)
	if err != nil {
		return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
	}

	err = json.Unmarshal([]byte(C.GoString(recipeInterface)), &recipe)
	if err != nil {
		return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
	}

	fmt.Printf("[SHIM] Starting plugin: %s\n", module.ShimType)

	dataDir, err := os.MkdirTemp("", fmt.Sprintf("*-vibshim-%s", module.ShimType))
	if err != nil {
		return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
	}
	defer os.RemoveAll(dataDir)

	pluginCommand := fmt.Sprintf("%s/%s", recipe.PluginPath, module.ShimType)
	modulePath := filepath.Join(dataDir, "moduleInterface")
	recipePath := filepath.Join(dataDir, "recipeInterface")

	err = os.WriteFile(modulePath, []byte(C.GoString(moduleInterface)), 0o777)
	if err != nil {
		return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
	}
	err = os.WriteFile(recipePath, []byte(C.GoString(recipeInterface)), 0o777)
	if err != nil {
		return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
	}

	out, err := exec.Command(pluginCommand, modulePath, recipePath).Output()
	if err != nil {
		return C.CString(fmt.Sprintf("ERROR: %s", err.Error()))
	}
	return C.CString(string(out))
}

main function

Show/Hide Function Body
{}

bufio import

Import example:

import "bufio"

encoding/json import

Import example:

import "encoding/json"

fmt import

Import example:

import "fmt"

os import

Import example:

import "os"

path/filepath import

Import example:

import "path/filepath"

C import

Import example:

import "C"

github.com/vanilla-os/vib/api import

Import example:

import "github.com/vanilla-os/vib/api"

C import

Import example:

import "C"

encoding/json import

Import example:

import "encoding/json"

fmt import

Import example:

import "fmt"

path/filepath import

Import example:

import "path/filepath"

github.com/vanilla-os/vib/api import

Import example:

import "github.com/vanilla-os/vib/api"

C import

Import example:

import "C"

encoding/json import

Import example:

import "encoding/json"

fmt import

Import example:

import "fmt"

path/filepath import

Import example:

import "path/filepath"

github.com/vanilla-os/vib/api import

Import example:

import "github.com/vanilla-os/vib/api"

C import

Import example:

import "C"

encoding/json import

Import example:

import "encoding/json"

fmt import

Import example:

import "fmt"

github.com/vanilla-os/vib/api import

Import example:

import "github.com/vanilla-os/vib/api"

os import

Import example:

import "os"

path import

Import example:

import "path"

strings import

Import example:

import "strings"

C import

Import example:

import "C"

fmt import

Import example:

import "fmt"

github.com/vanilla-os/vib/api import

Import example:

import "github.com/vanilla-os/vib/api"

encoding/json import

Import example:

import "encoding/json"

C import

Import example:

import "C"

encoding/json import

Import example:

import "encoding/json"

fmt import

Import example:

import "fmt"

github.com/vanilla-os/vib/api import

Import example:

import "github.com/vanilla-os/vib/api"

strings import

Import example:

import "strings"

C import

Import example:

import "C"

encoding/json import

Import example:

import "encoding/json"

fmt import

Import example:

import "fmt"

strings import

Import example:

import "strings"

github.com/vanilla-os/vib/api import

Import example:

import "github.com/vanilla-os/vib/api"

encoding/json import

Import example:

import "encoding/json"

fmt import

Import example:

import "fmt"

C import

Import example:

import "C"

github.com/vanilla-os/vib/api import

Import example:

import "github.com/vanilla-os/vib/api"

os import

Import example:

import "os"

os/exec import

Import example:

import "os/exec"

path/filepath import

Import example:

import "path/filepath"