Giter VIP home page Giter VIP logo

Comments (8)

heistp avatar heistp commented on May 31, 2024

Yes, because I was trying to keep the binary as small as possible and ogier/pflag was smaller and had the features I needed. Just tested it now and it's a two-liner to replace the imports with spf13 but adds 124K to the (minimized) binary. All I want is normal long form options with -- and not -. :)

If that's causing a hassle and there's no way you can just import a package (?) I suppose I could take the 124K hit.

from irtt.

tohojo avatar tohojo commented on May 31, 2024

from irtt.

heistp avatar heistp commented on May 31, 2024

Yes, they're compatible. To be on the safe side replace ogier/pflag with spf13/pflag. For now it's only in irtt_client.go and irtt_server.go, although *.go is probably better in case names change. That would be nice if you could patch it that way.

from irtt.

tohojo avatar tohojo commented on May 31, 2024

from irtt.

heistp avatar heistp commented on May 31, 2024

Ok, so in case this unified diff helps...

% git diff irtt_client.go irtt_server.go 
diff --git a/irtt_client.go b/irtt_client.go
index 38f2d21..c8d2cd3 100644
--- a/irtt_client.go
+++ b/irtt_client.go
@@ -14,7 +14,7 @@ import (
        "text/tabwriter"
        "time"
 
-       flag "github.com/ogier/pflag"
+       flag "github.com/spf13/pflag"
 )
 
 func clientUsage() {
diff --git a/irtt_server.go b/irtt_server.go
index 6bdc0da..98ae5e9 100644
--- a/irtt_server.go
+++ b/irtt_server.go
@@ -6,7 +6,7 @@ import (
        "strings"
        "syscall"
 
-       flag "github.com/ogier/pflag"
+       flag "github.com/spf13/pflag"
 )
 
 func serverUsage() {

from irtt.

tohojo avatar tohojo commented on May 31, 2024

from irtt.

tohojo avatar tohojo commented on May 31, 2024

Finally got around to packaing irtt for Fedora: https://src.fedoraproject.org/rpms/golang-github-heistp-irtt

So closing this issue :)

from irtt.

heistp avatar heistp commented on May 31, 2024

Great, thanks!

from irtt.

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.