Example loadable plugin
Source
xxxxxxxxxx
/*
** Copyright (C) 2001-2024 Zabbix SIA
** Copyright (C) 2001-2025 Zabbix SIA
**
** Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
** documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
** rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
** permit persons to whom the Software is furnished to do so, subject to the following conditions:
**
** The above copyright notice and this permission notice shall be included in all copies or substantial portions
** of the Software.
**
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
`
//nolint:gochecknoglobals,revive // required ALL_CAPS by build scripts
var (
PLUGIN_VERSION_MAJOR = 7
PLUGIN_VERSION_MINOR = 2
PLUGIN_VERSION_PATCH = 0
PLUGIN_VERSION_RC = "alpha1"
PLUGIN_LICENSE_YEAR = 2024
PLUGIN_LICENSE_YEAR = 2025
)
func main() {
err := flag.HandleFlags(
plugin.Name,
os.Args[0],
fmt.Sprintf(copyrightMessage, PLUGIN_LICENSE_YEAR),
PLUGIN_VERSION_RC,
PLUGIN_VERSION_MAJOR,
PLUGIN_VERSION_MINOR,