Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix go module name #23

Closed
wants to merge 4 commits into from
Closed

Fix go module name #23

wants to merge 4 commits into from

Conversation

ixdy
Copy link

@ixdy ixdy commented Feb 12, 2021

It looks like there was a typo in the go module name introduced in #19:

$ go get -u github.com/octago/sflags
go: github.com/octago/sflags upgrade => v0.3.0                                          
go get: github.com/octago/sflags@v0.3.0: parsing go.mod:                                                                                                                        
        module declares its path as: github.com/sflags                                                                                                                          
                but was required as: github.com/octago/sflags     

Note that we'll need to tag a new version after merging this PR.

@m0sth8
Copy link
Contributor

m0sth8 commented Feb 12, 2021

@ixdy Thank you.

I need to check what needs to be fixed for Travis-CI tests.

@ixdy
Copy link
Author

ixdy commented Feb 12, 2021

I think something may have changed about formatting in go1.15. When I run the tests locally (against go1.15.8):

--- FAIL: TestDurationValue (0.00s)                                                                                                                                             
    --- FAIL: TestDurationValue/in:_3l (0.00s)                                                                                                                                  
        values_generated_test.go:8971:                                                                                                                                          
                Error Trace:    values_generated_test.go:8971                                                                                                                   
                Error:          Error message not equal:                                                                                                                        
                                expected: "time: unknown unit l in duration 3l"                                                                                                 
                                actual  : "time: unknown unit \"l\" in duration \"3l\""                                                                                         
                Test:           TestDurationValue/in:_3l                                                                                                                        
--- FAIL: TestDurationSliceValue (0.00s)                                                                                                                                        
    --- FAIL: TestDurationSliceValue/in:_[1s,3l] (0.00s)                                                                                                                        
        values_generated_test.go:9109:                                                                                                                                          
                Error Trace:    values_generated_test.go:9109                                                                                                                   
                Error:          Error message not equal:                                                                                                                        
                                expected: "time: unknown unit l in duration 3l"                                                                                                 
                                actual  : "time: unknown unit \"l\" in duration \"3l\""                                                                                         
                Test:           TestDurationSliceValue/in:_[1s,3l]                                                                                                              
--- FAIL: TestStringDurationMapValue (0.00s)                                           
    --- FAIL: TestStringDurationMapValue/in:_[3l] (0.00s)         
        values_generated_test.go:9145:                                                  
                Error Trace:    values_generated_test.go:9145  
                Error:          Error message not equal:                                
                                expected: "time: unknown unit l in duration 3l"
                                actual  : "time: unknown unit \"l\" in duration \"3l\""
                Test:           TestStringDurationMapValue/in:_[3l]            
--- FAIL: TestIntDurationMapValue (0.00s)                                               
    --- FAIL: TestIntDurationMapValue/in:_[3l] (0.00s)           
        values_generated_test.go:9186:                                                  
                Error Trace:    values_generated_test.go:9186   
                Error:          Error message not equal:                                
                                expected: "time: unknown unit l in duration 3l"
                                actual  : "time: unknown unit \"l\" in duration \"3l\""
                Test:           TestIntDurationMapValue/in:_[3l]
--- FAIL: TestInt8DurationMapValue (0.00s)
    --- FAIL: TestInt8DurationMapValue/in:_[3l] (0.00s)
        values_generated_test.go:9227: 
                Error Trace:    values_generated_test.go:9227
                Error:          Error message not equal:
                                expected: "time: unknown unit l in duration 3l"
                                actual  : "time: unknown unit \"l\" in duration \"3l\""
                Test:           TestInt8DurationMapValue/in:_[3l]
--- FAIL: TestInt16DurationMapValue (0.00s)
    --- FAIL: TestInt16DurationMapValue/in:_[3l] (0.00s)
        values_generated_test.go:9268: 
                Error Trace:    values_generated_test.go:9268
                Error:          Error message not equal:                                                                                                               [30/1887]
                                expected: "time: unknown unit l in duration 3l"
                                actual  : "time: unknown unit \"l\" in duration \"3l\""
                Test:           TestInt16DurationMapValue/in:_[3l]
--- FAIL: TestInt32DurationMapValue (0.00s)
    --- FAIL: TestInt32DurationMapValue/in:_[3l] (0.00s)
        values_generated_test.go:9309: 
                Error Trace:    values_generated_test.go:9309
                Error:          Error message not equal:
                                expected: "time: unknown unit l in duration 3l"
                                actual  : "time: unknown unit \"l\" in duration \"3l\""
                Test:           TestInt32DurationMapValue/in:_[3l]
--- FAIL: TestInt64DurationMapValue (0.00s)
    --- FAIL: TestInt64DurationMapValue/in:_[3l] (0.00s)
        values_generated_test.go:9350: 
                Error Trace:    values_generated_test.go:9350
                Error:          Error message not equal:
                                expected: "time: unknown unit l in duration 3l"
                                actual  : "time: unknown unit \"l\" in duration \"3l\""
                Test:           TestInt64DurationMapValue/in:_[3l]
--- FAIL: TestUintDurationMapValue (0.00s)
    --- FAIL: TestUintDurationMapValue/in:_[3l] (0.00s)
        values_generated_test.go:9391: 
                Error Trace:    values_generated_test.go:9391
                Error:          Error message not equal:
                                expected: "time: unknown unit l in duration 3l"
                                actual  : "time: unknown unit \"l\" in duration \"3l\""
                Test:           TestUintDurationMapValue/in:_[3l]
--- FAIL: TestUint8DurationMapValue (0.00s)
    --- FAIL: TestUint8DurationMapValue/in:_[3l] (0.00s)
        values_generated_test.go:9432: 
                Error Trace:    values_generated_test.go:9432
                Error:          Error message not equal:
                                expected: "time: unknown unit l in duration 3l"
                                actual  : "time: unknown unit \"l\" in duration \"3l\""
                Test:           TestUint8DurationMapValue/in:_[3l]
--- FAIL: TestUint16DurationMapValue (0.00s) 
    --- FAIL: TestUint16DurationMapValue/in:_[3l] (0.00s)
        values_generated_test.go:9473: 
                Error Trace:    values_generated_test.go:9473
                Error:          Error message not equal:
                                expected: "time: unknown unit l in duration 3l"
                                actual  : "time: unknown unit \"l\" in duration \"3l\""
                Test:           TestUint16DurationMapValue/in:_[3l]
--- FAIL: TestUint32DurationMapValue (0.00s) 
    --- FAIL: TestUint32DurationMapValue/in:_[3l] (0.00s)
        values_generated_test.go:9514: 
                Error Trace:    values_generated_test.go:9514
                Error:          Error message not equal:
                                expected: "time: unknown unit l in duration 3l"
                                actual  : "time: unknown unit \"l\" in duration \"3l\""
                Test:           TestUint32DurationMapValue/in:_[3l]
--- FAIL: TestUint64DurationMapValue (0.00s) 
    --- FAIL: TestUint64DurationMapValue/in:_[3l] (0.00s)
        values_generated_test.go:9555: 
                Error Trace:    values_generated_test.go:9555
                Error:          Error message not equal:
                                expected: "time: unknown unit l in duration 3l"
                                actual  : "time: unknown unit \"l\" in duration \"3l\""
                Test:           TestUint64DurationMapValue/in:_[3l]
FAIL
FAIL    github.com/octago/sflags        0.058s
?       github.com/octago/sflags/cmd/genvalues  [no test files]
?       github.com/octago/sflags/examples/anonymous     [no test files]
?       github.com/octago/sflags/examples/cobra [no test files]
?       github.com/octago/sflags/examples/flag  [no test files]
?       github.com/octago/sflags/examples/kingpin       [no test files]
?       github.com/octago/sflags/examples/pflag [no test files]
?       github.com/octago/sflags/examples/simple_flag   [no test files]
?       github.com/octago/sflags/examples/urfave_cli    [no test files]
?       github.com/octago/sflags/examples/validator     [no test files]
ok      github.com/octago/sflags/gen/gcli       (cached)
ok      github.com/octago/sflags/gen/gflag      (cached)
ok      github.com/octago/sflags/gen/gkingpin   (cached)
ok      github.com/octago/sflags/gen/gpflag     (cached)
ok      github.com/octago/sflags/validator/govalidator  (cached)
FAIL

whereas the tests all pass against go1.14.

@ixdy
Copy link
Author

ixdy commented Feb 12, 2021

Yeah, golang/go@201cb04 caused the new failures. Thinking about how to best fix this now...

@ixdy
Copy link
Author

ixdy commented Feb 12, 2021

(one option would be to test only against go1.15+ and update the test cases, especially given that go1.14 is likely going to EOL soon, though I'm not sure if that's something you're comfortable with.)

@m0sth8
Copy link
Contributor

m0sth8 commented Feb 20, 2021

@ixdy sorry, I have some issues with internet because of the weather and snow. Hope I'll be able to take a closer look next week.

@ThinkChaos ThinkChaos mentioned this pull request Dec 22, 2021
@abitrolly
Copy link
Contributor

Thanks for the contribution.

Go module name is fixed in b0295b1.

@abitrolly abitrolly closed this Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants