Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-24302

Go 1.20 specific feature considered bad language design; avoid using it

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Won't fix
    • Icon: Trivial Trivial
    • None
    • 7.0.0beta1, 7.0.0beta2, 7.0.0beta3
    • Agent2 plugin (N)
    • None
    • Go 1.20, introduced in a325665c2a22309e2666a32789bbe510f5bf9bc9 (<7.0.0.alpha7)

      The feature of `errors.Join()` is specific to Go 1.20+. Many calls to it are made from zabbix_agent2.go. 

      Regardless, use of these is considered a bad practice by golang experts:

      https://dev.to/wspowell/avoid-go120-error-handling-27hd

      However, the real question is: why introduce a "feature" that isn't really helpful but breaks backward compatibility with go 1.19? 

      You might ask "why remain compatible with go 1.19"? Answer: older systems need it. For example: RHEL7/CentOS7. Who care that it's soon EOL. Upgrading these systems is "non-trivial" and not worth the effort, usually.

       

            rzvejs Rudolfs Zvejs
            otheus Otheus
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: