bitflag

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2022 License: MIT Imports: 0 Imported by: 0

README

bitflag

GitHub Workflow Status godoc GitHub codecov

Golang Bitwise Flag

How To Use

go get github.com/anantadwi13/bitflag

Please check example/main.go on how to use this package

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flag

type Flag uint
const Default Flag = 0

func New

func New(flags ...Flag) Flag

func (*Flag) Has

func (f *Flag) Has(flags ...Flag) bool

Has is used to check whether the flags exist or not. It will return true if all flags exist. It will return false if there is one flag doesn't exist

func (*Flag) Remove

func (f *Flag) Remove(flags ...Flag)

Remove is used to disable the flags

func (*Flag) Set

func (f *Flag) Set(flags ...Flag)

Set is used to enable the flags

func (*Flag) Toggle

func (f *Flag) Toggle(flags ...Flag)

Toggle is used to enable/disable the flags

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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