Git Product home page Git Product logo

Comments (2)

julthomas avatar julthomas commented on May 27, 2024

Hello,

The requirement on go 1.21 was set in commit bbe196b "feat: upgrade go.mod to 1.21 (#1830)". This is related to the patch on pkg/yqlib/operator_omit.go because it uses a max() function that is apparenty not available in go 1.20. Preserving go 1.20 compatibility would be great because that version is available in el8 and el9.

So far I was able to build our RPM package without too much hassle that patch:

--- a/go.mod
+++ b/go.mod
@@ -30,4 +30,4 @@ require (
        golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
 )
 
-go 1.21
+go 1.20
--- a/pkg/yqlib/operator_omit.go
+++ b/pkg/yqlib/operator_omit.go
@@ -5,6 +5,13 @@ import (
        "strconv"
 )
 
+func max(a, b int) int {
+    if a > b {
+        return a
+    }
+    return b
+}
+
 func omitMap(original *CandidateNode, indices *CandidateNode) *CandidateNode {
        filteredContent := make([]*CandidateNode, 0, max(0, len(original.Content)-len(indices.Content)*2))

Regards,
Julien

from yq.

mikefarah avatar mikefarah commented on May 27, 2024

Sorry yq does not have backwards compatibility for older versions of go. Often the go version is bumped for security issues.

from yq.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.