utils

package
v0.0.0-...-4add913 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package utils provides helper functions for permctl

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckIfUnknownSubcommand

func CheckIfUnknownSubcommand(cmd *cobra.Command, args []string)

CheckIfUnknownSubcommand halts execution on passing unknown subcommand. Which is not usually an error

func CmdHelp

func CmdHelp(cmd *cobra.Command, _ []string)

CmdHelp shows help templates on commands

func ParseEntity

func ParseEntity(entityStr string) (*v1.Entity, error)

func ParseSubject

func ParseSubject(subjectStr string) (*v1.Subject, error)

func PrettyPrint

func PrettyPrint(i interface{}) string

PrettyPrint readable json to terminal

func ReadFileToString

func ReadFileToString(filePath string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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