goonung

package module
v0.0.0-...-5390376 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 License: MIT Imports: 9 Imported by: 0

README

goONung

Go simple utility helpers to support my work in ideas and projects.

The name Goonung is derived from 2 words :

  • Go, the main core language used for this personal repository
  • Cemenung, a 350 masl small hill nearby the village where I was born and grew up, located in south-eastern of Tulungagung (East Java, Indonesia).

Author

Technology Stack

Goonung is developed using :

  • Go 1.13.1 (darwin/amd64)

And I recommend you to use Go 1.11 and later to continue to learn or help me to develop these bunch of code, guys.

Installation

To work with Goonung, you can start by using the command :

  • Using $GOPATH fundamental

    $ go get -u github.com/ravivendra/goonung

Currently I am on progress to make it compatible with GO Modules fundamental.

Coverage Test

Currently, these codes have been completed with unit test, just run command below to run the test :

$ go test -v -cover

Here is the result of coverage test :

ravivendra:goonung ravivendra$ go test -cover
PASS
coverage: 100.0% of statements
ok      github.com/ravivendra/goonung    0.396s

License

MIT License

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Calculate

func Calculate(param interface{}) (int, error)

Calculate : calculate the Luhn

func ConvertCurrentTimeToDifferentTimezone

func ConvertCurrentTimeToDifferentTimezone(now time.Time, location string) (time.Time, string, error)

ConvertCurrentTimeToDifferentTimezone : convert current time to other timezone

func FileRotation

func FileRotation(dir, fileType, ballFileType string) error

FileRotation : rotate (archiving) files with day-1 and create the new one

func GetCurrentTime

func GetCurrentTime() (time.Time, error)

GetCurrentTime : get current time

func GetCurrentTimeInVariousTimezone

func GetCurrentTimeInVariousTimezone(now time.Time, locations []string) (map[string]time.Time, error)

GetCurrentTimeInVariousTimezone : get current time on various timezone

func GetCurrentTimezone

func GetCurrentTimezone(now time.Time) (string, error)

GetCurrentTimezone : get current timezone

func IsArray

func IsArray(param interface{}) (bool, error)

IsArray : method to check the param is array

func IsBool

func IsBool(param interface{}) (bool, error)

IsBool : method to check the param is boolean

func IsComplex

func IsComplex(param interface{}) (bool, error)

IsComplex : method to check the param is complex

func IsFloat

func IsFloat(param interface{}) (bool, error)

IsFloat : method to check the param is float

func IsInt

func IsInt(param interface{}) (bool, error)

IsInt : method to check the param is integer

func IsSlice

func IsSlice(param interface{}) (bool, error)

IsSlice : method to check the param is slice

func IsString

func IsString(param interface{}) (bool, error)

IsString : method to check the param is string

func IsStruct

func IsStruct(param interface{}) (bool, error)

IsStruct : method to check the param is struct

func IsUint

func IsUint(param interface{}) (bool, error)

IsUint : method to check the param is unsigned integer

func IsUintPtr

func IsUintPtr(param interface{}) (bool, error)

IsUintPtr : method to check the param is unsigned integer pointer (unsafe)

func IsValidNumber

func IsValidNumber(numbers int) bool

IsValidNumber : validate the number for Luhn

func Palindrom

func Palindrom(texts []string) (map[string]bool, error)

Palindrom : check string is palindrom or not

func Read

func Read(path string, mode int) ([]byte, error)

Read : read a file and return bytes

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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