In linux build
func isHidden(filename string) (bool, error) { if len(filepath.Base(filename)) > 0 && filepath.Base(filename)[0:1] == "." { return true, nil } return false, nil }
You are checking via
isHidden, err := hidden.IsHidden("./test", false)
It will always end up panic because this file will be renamed to ./.test after hiding it and the above isHidden will never find the file.
./.test
isHidden
For windows it should be working fine with the example in your package.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
In linux build
You are checking via
It will always end up panic because this file will be renamed to
./.test
after hiding it and the aboveisHidden
will never find the file.For windows it should be working fine with the example in your package.