An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 8.2% on proxy.golang.org

proxy.golang.org : github.com/powerman/constvar

Package constvar provides safer constant values for global variables. Some Go types can't be used for constant values, thus we've to use global variables instead. But variables may be occasionally modified, which usually result in hard-to-spot bugs. This package helps to work around. Usage Of course, no one stops you from re-defining global variable, but it's much more easier to notice (on code review) usage of constvar package outside of defining global vars than usual variable assignment. It's now possible to set to nil global variables defined using constvar. This shouldn't be a real issue because this will result in run-time panic on accessing it value and thus won't go unnoticed. Code is more self-documented now. :) ★ Configuration for golangci-lint

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/powerman/constvar
License: MIT
Latest release: over 3 years ago
First release: over 3 years ago
Namespace: github.com/powerman
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 10 days ago

    Loading...
    Readme
    Loading...