Skip to content

Commit

Permalink
Merge pull request #169 from nabbar/semaphore
Browse files Browse the repository at this point in the history
Rework Semaphore & Progress

Package Semaphore
- simplify the base semaphore (context, max wheight...)
- merge semaphore with progress instance
- extend semaphore with context interface

Package Progress
- rework MPB instance
- bump MBP to v8
- integrate MPB into Semaphore to use a same instance for sem / mpb
- rework bar to simplify it
- bar is now also a semaphore & context
- allow to create bar with custom options
  • Loading branch information
nabbar authored Oct 16, 2023
2 parents 023ee1f + c90acd9 commit 4675b42
Show file tree
Hide file tree
Showing 27 changed files with 1,052 additions and 1,047 deletions.
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ require (
github.com/spf13/jwalterweatherman v1.1.0
github.com/spf13/viper v1.17.0
github.com/ugorji/go/codec v1.2.11
github.com/vbauerster/mpb/v5 v5.4.0
github.com/vbauerster/mpb/v8 v8.6.2
github.com/xanzy/go-gitlab v0.93.1
github.com/xhit/go-simple-mail v2.2.2+incompatible
Expand Down
2 changes: 1 addition & 1 deletion logger/interface_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ var _ = Describe("Logger", func() {
}(sub)

log.SetFields(logfld.New(GetContext).Add("logger", "main"))
sem := libsem.NewSemaphoreWithContext(context.Background(), 0)
sem := libsem.New(context.Background(), 0, false)
defer sem.DeferMain()

for i := 0; i < 25; i++ {
Expand Down
256 changes: 0 additions & 256 deletions progress/bar.go

This file was deleted.

63 changes: 0 additions & 63 deletions progress/error.go

This file was deleted.

Loading

0 comments on commit 4675b42

Please sign in to comment.