mas

package
v0.0.0-...-1140a65 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package mas is Example of Maps Arrays and Slices

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddToSlices

func AddToSlices()

AddToSlices Adds elements to an array slice

func CompareNumbers

func CompareNumbers(i1, i2 int) (bool, int)

CompareNumbers compares two integers

func InitCli

func InitCli()

InitCli for command: the-gpl mas -fn=array

eg: the-gpl mas -fn=array # Tests the array example
    the-gpl mas -fn=comp -n1=123 -n2=345 # compares n1 and n2 and computes n1 - n2

func IterateOverArray

func IterateOverArray()

IterateOverArray uses range to iterate over an example array

Types

type CLI

type CLI struct {
	// contains filtered or unexported fields
}

CLI wrapper for *flag.FlagSet

func (CLI) DisplayHelp

func (m CLI) DisplayHelp()

DisplayHelp prints help on command line for bits module

func (CLI) ExecCmd

func (m CLI) ExecCmd(args []string)

ExecCmd runs bit-count from CLI

type Stringer

type Stringer interface {
	StringMe() string
}

Stringer a type assertion takes a value and tries to create another version in specified explicit type

Jump to

Keyboard shortcuts

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