Categorygithub.com/lordtor/go-common-lib
modulepackage
1.0.5
Repository: https://github.com/lordtor/go-common-lib.git
Documentation: pkg.go.dev

# README

Go common lib

Security Rating Bugs Code Smells Coverage

Tis module used as smaple module for most popular func.

ENV parameters

  • N/a

File parameters application.yml

  • N/a

Lint, Test & Coverage

  1. Install linter

    go install github.com/golangci/golangci-lint/cmd/golangci-lint
    

    run check

    golangci-lint run  > checkstyle.xml
    
  2. Run test

    go test -v -coverpkg=./... -coverprofile=profile.cov ./... -json > test_report.json
    
  3. Coverage

    go tool cover -func profile.cov
    

Methods

MethodDescriptionParamsResult
SliceContainA function to check slice contain item stringslice []string, item stringbool
UpdateListA function for update exist slice not contain item stringslice []string, item string[]string
StringFromListA function convert slice to stinglist []stringst string
UpdateStructListA function for update exist slice values from anothe slicemain []string, in []string[]string
CalcHashA function for calculate string hash sum by sha256aStr stringstring
SortedMapA function for sort slice map'sm []map[string]stringout []map[string]string
ListConvertA function for convert interface to slice stringsin interface{}[]string, error
UpdateMapListA function for update slince map by not exist mapsliceMaps []map[string]string, itemMap map[string]string[]map[string]string
StandardizeSpacesA function for trim first & last spaces stringstring
UpdateListBySplitA function for update slice string by splited values use slice spliters stringslice []string, item string, spliters []string[]string
MapListConvertA function for convert interface to slice mapin interface{}[]map[string]string, error

# Functions

A function for calculate string hash sum by sha256 The return value is hash string.
A function to check slice contain item string The return value is bool.
A function for convert interface to slice map The return value is slice map or error.
A function for convert interface to slice strings The return value is slice strings.
A function for decode one interface values to anothe The return set multi atributes to span.
A function for calculate string hash sum by sha256 The return value is hash string.
A function for convert interface to slice strings The return value is slice strings.
A function for convert interface to slice map The return value is slice map or error.
A function to check slice contain item string The return value is bool.
A function for sort slice map`s The return value is sorted slice.
A function for sort slice map`s The return value is sorted slice.
A function for set multi atributes to span The return set multi atributes to span.
A function for trim first & last space The return value is trimed string.
A function convert slice to sting The return value is string.
A function convert slice to sting The return value is string.
A function for trim first & last space The return value is trimed string.
A function for update exist slice not contain item string The return value is new slice.
A function for update slice string by splited values use slice spliters string The return value is slice strings.
A function for update slince map by not exist map The return value is updated slice.
A function for update slince map by not exist map The return value is updated slice.
A function for update exist slice not contain item string The return value is new slice.
A function for update slice string by splited values use slice spliters string The return value is slice strings.
A function for update exist slice values from anothe slice The return value is updated slice.
A function for update exist slice values from anothe slice The return value is updated slice.

# Variables

No description provided by the author