google / martian

Martian is a library for building custom HTTP/S proxies
Apache License 2.0
2.01k stars 247 forks source link

refactoring to avoid flag definition clash #336

Closed phaus closed 2 years ago

phaus commented 2 years ago

should fix #335 335

tomasbanet commented 2 years ago

Hey. Any updates on this PR? Running into this issue while trying to use https://pkg.go.dev/cloud.google.com/go@v0.103.0/httpreplay (issue at https://github.com/googleapis/google-cloud-go/issues/6501). So far my work-around consists of changing the Init function to:

// Init runs common initialization code for a martian proxy.
func Init() {
    level := flag.Int("v", 0, "log level")
    flag.Parse()
    mlog.SetLevel(*level)
}
chrisivens commented 2 years ago

Does this really need to bump to golang v1.18? Can it perhaps only go as far as v1.17? Some packages aren't yet ported to 1.18 fully yet.

thenakulchawla commented 10 months ago

Since this change is merged, will a new tag get created so we can pull the right version in? Thanks.