Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

introducing common utils package(s) #279

Merged
merged 4 commits into from
Apr 2, 2021
Merged

introducing common utils package(s) #279

merged 4 commits into from
Apr 2, 2021

Conversation

warber
Copy link
Contributor

@warber warber commented Apr 1, 2021

Signed-off-by: warber [email protected]

"strings"
)

func ReadFile(fileName string) ([]byte, error) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[golint] reported by reviewdog 🐶
exported function ReadFile should have comment or be unexported

return data, nil
}

func ReadFileAsStr(fileName string) (string, error) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[golint] reported by reviewdog 🐶
exported function ReadFileAsStr should have comment or be unexported

return string(content), err
}

func FileExists(filename string) bool {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[golint] reported by reviewdog 🐶
exported function FileExists should have comment or be unexported

return !info.IsDir()
}

func ExpandTilde(fileName string) string {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[golint] reported by reviewdog 🐶
exported function ExpandTilde should have comment or be unexported

return fileName
}

func UserHomeDir() string {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[golint] reported by reviewdog 🐶
exported function UserHomeDir should have comment or be unexported

"time"
)

func DownloadFromURL(url string) ([]byte, error) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[golint] reported by reviewdog 🐶
exported function DownloadFromURL should have comment or be unexported


import "net/url"

func IsValidURL(strURL string) bool {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[golint] reported by reviewdog 🐶
exported function IsValidURL should have comment or be unexported

@sonarcloud
Copy link

sonarcloud bot commented Apr 1, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@warber warber changed the title copied common functionalities to commonutils package introducec commun utils package(s) Apr 1, 2021
@warber warber changed the title introducec commun utils package(s) introducing common utils package(s) Apr 1, 2021
@warber warber marked this pull request as ready for review April 1, 2021 10:39
@warber warber merged commit 764b633 into master Apr 2, 2021
@johannes-b johannes-b deleted the feature/commonutils branch April 20, 2021 11:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants