Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNil ¶ added in v0.2.9
IsNil is a function that checks if a value is nil.
Parameters:
- value: The value to check.
Return:
- bool: True if the value is nil, false otherwise.
func RunInPowerShell ¶ added in v0.2.20
RunInPowerShell is a function that returns a function that runs a program in a new PowerShell process.
Upon calling the returned function, a new PowerShell process is started with the specified program and arguments. The function returns an error if the process cannot be started.
Parameters:
- program: The path to the program to run.
- args: The arguments to pass to the program.
Return:
- MainFunc: A function that runs the program in a new PowerShell process.
func SplitIntoGroups ¶
SplitIntoGroups splits the slice into n groups and returns a 2D slice where each inner slice represents a group.
Parameters:
- slice: The slice to split.
- n: The number of groups to split the slice into.
Return:
- [][]T: A 2D slice where each inner slice represents a group. Nil if n is less than or equal to 0.
Example:
slice := []int{1, 2, 3, 4, 5} n := 3 groups := SplitIntoGroups(slice, n) fmt.Println(groups) // Output: [[1 4] [2 5] [3]]
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.