macos

package
v2.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2023 License: MIT Imports: 2 Imported by: 0

README

goutils/v2/macos

The macos package is a part of goutils library. It provides utility functions for macos oriented operations in Go.


Functions

InstallBrewDeps
func InstallBrewDeps(brewPackages []string) error

Installs the input brew packages by running brew install.

InstallBrewTFDeps
func InstallBrewTFDeps() error

Install dependencies for terraform projects using homebrew.


Installation

To use the goutils/v2/macos package, you need to install it via go get:

go get github.com/l50/goutils/v2/macos

Usage

After installation, you can import it in your project:

import "github.com/l50/goutils/v2/macos"

Tests

To run the tests for the goutils/v2/macos package, navigate to your $GOPATH/src/github.com/l50/goutils/v2/macos directory and run go test:

go test -v

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.


License

This project is licensed under the MIT License - see the LICENSE file for details.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InstallBrewDeps

func InstallBrewDeps(brewPackages []string) error

InstallBrewDeps installs the input brew packages by running brew install. If any installation fails, it returns an error.

Parameters:

brewPackages: A slice of strings representing the brew packages to be installed.

Returns:

error: An error if any brew package fails to install.

Example:

brewPackages := []string{"shellcheck", "shfmt"} err := macos.InstallBrewDeps(brewPackages)

if err != nil {
  log.Fatalf("failed to install brew dependencies: %v", err)
}

func InstallBrewTFDeps

func InstallBrewTFDeps() error

InstallBrewTFDeps installs dependencies for terraform projects using homebrew. The dependencies include several shell and terraform tools. If any installation fails, it returns an error.

Returns:

error: An error if any brew package fails to install.

Example:

err := macos.InstallBrewTFDeps()

if err != nil {
  log.Fatalf("failed to install terraform brew dependencies: %v", err)
}

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL