-
-
Notifications
You must be signed in to change notification settings - Fork 500
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: restructure Docker helper methods (#799)
* chore: add InAContainer * chore: use new internal method for inAContainer * chore: extract default gateway calculation to the internal package * chore: move sessionID to the internal packages * chore: simplify getting the string from the session ID * chore: expose DaemonHost in the Docker provider It will allow example modules to consume it * fix: handle error in tests
- Loading branch information
1 parent
10cdf3a
commit a201e1d
Showing
5 changed files
with
94 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package testcontainerssession | ||
|
||
import ( | ||
"sync" | ||
|
||
"github.com/google/uuid" | ||
) | ||
|
||
var id uuid.UUID | ||
var idOnce sync.Once | ||
|
||
func ID() uuid.UUID { | ||
idOnce.Do(func() { | ||
id = uuid.New() | ||
}) | ||
|
||
return id | ||
} | ||
|
||
func String() string { | ||
return ID().String() | ||
} |
This file was deleted.
Oops, something went wrong.