mirror of
				https://gitea.com/Lydanne/buildx.git
				synced 2025-11-04 10:03:42 +08:00 
			
		
		
		
	Merge pull request #2284 from crazy-max/update-uuid
vendor: update github.com/google/uuid to v1.6.0
This commit is contained in:
		
							
								
								
									
										2
									
								
								go.mod
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								go.mod
									
									
									
									
									
								
							@@ -21,7 +21,7 @@ require (
 | 
				
			|||||||
	github.com/gogo/protobuf v1.3.2
 | 
						github.com/gogo/protobuf v1.3.2
 | 
				
			||||||
	github.com/golang/protobuf v1.5.3
 | 
						github.com/golang/protobuf v1.5.3
 | 
				
			||||||
	github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
 | 
						github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
 | 
				
			||||||
	github.com/google/uuid v1.5.0
 | 
						github.com/google/uuid v1.6.0
 | 
				
			||||||
	github.com/hashicorp/go-cty-funcs v0.0.0-20230405223818-a090f58aa992
 | 
						github.com/hashicorp/go-cty-funcs v0.0.0-20230405223818-a090f58aa992
 | 
				
			||||||
	github.com/hashicorp/hcl/v2 v2.19.1
 | 
						github.com/hashicorp/hcl/v2 v2.19.1
 | 
				
			||||||
	github.com/moby/buildkit v0.13.0-rc2
 | 
						github.com/moby/buildkit v0.13.0-rc2
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										4
									
								
								go.sum
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								go.sum
									
									
									
									
									
								
							@@ -227,8 +227,8 @@ github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLe
 | 
				
			|||||||
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4=
 | 
					github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4=
 | 
				
			||||||
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ=
 | 
					github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ=
 | 
				
			||||||
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
 | 
					github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
 | 
				
			||||||
github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU=
 | 
					github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
 | 
				
			||||||
github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
 | 
					github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
 | 
				
			||||||
github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
 | 
					github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
 | 
				
			||||||
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
 | 
					github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
 | 
				
			||||||
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
 | 
					github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										13
									
								
								vendor/github.com/google/uuid/CHANGELOG.md
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										13
									
								
								vendor/github.com/google/uuid/CHANGELOG.md
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,5 +1,18 @@
 | 
				
			|||||||
# Changelog
 | 
					# Changelog
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## [1.6.0](https://github.com/google/uuid/compare/v1.5.0...v1.6.0) (2024-01-16)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Features
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* add Max UUID constant ([#149](https://github.com/google/uuid/issues/149)) ([c58770e](https://github.com/google/uuid/commit/c58770eb495f55fe2ced6284f93c5158a62e53e3))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Bug Fixes
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* fix typo in version 7 uuid documentation ([#153](https://github.com/google/uuid/issues/153)) ([016b199](https://github.com/google/uuid/commit/016b199544692f745ffc8867b914129ecb47ef06))
 | 
				
			||||||
 | 
					* Monotonicity in UUIDv7 ([#150](https://github.com/google/uuid/issues/150)) ([a2b2b32](https://github.com/google/uuid/commit/a2b2b32373ff0b1a312b7fdf6d38a977099698a6))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## [1.5.0](https://github.com/google/uuid/compare/v1.4.0...v1.5.0) (2023-12-12)
 | 
					## [1.5.0](https://github.com/google/uuid/compare/v1.4.0...v1.5.0) (2023-12-12)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										6
									
								
								vendor/github.com/google/uuid/hash.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								vendor/github.com/google/uuid/hash.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -17,6 +17,12 @@ var (
 | 
				
			|||||||
	NameSpaceOID  = Must(Parse("6ba7b812-9dad-11d1-80b4-00c04fd430c8"))
 | 
						NameSpaceOID  = Must(Parse("6ba7b812-9dad-11d1-80b4-00c04fd430c8"))
 | 
				
			||||||
	NameSpaceX500 = Must(Parse("6ba7b814-9dad-11d1-80b4-00c04fd430c8"))
 | 
						NameSpaceX500 = Must(Parse("6ba7b814-9dad-11d1-80b4-00c04fd430c8"))
 | 
				
			||||||
	Nil           UUID // empty UUID, all zeros
 | 
						Nil           UUID // empty UUID, all zeros
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// The Max UUID is special form of UUID that is specified to have all 128 bits set to 1.
 | 
				
			||||||
 | 
						Max = UUID{
 | 
				
			||||||
 | 
							0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
 | 
				
			||||||
 | 
							0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// NewHash returns a new UUID derived from the hash of space concatenated with
 | 
					// NewHash returns a new UUID derived from the hash of space concatenated with
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										39
									
								
								vendor/github.com/google/uuid/version7.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										39
									
								
								vendor/github.com/google/uuid/version7.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -44,7 +44,7 @@ func NewV7FromReader(r io.Reader) (UUID, error) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
// makeV7 fill 48 bits time (uuid[0] - uuid[5]), set version b0111 (uuid[6])
 | 
					// makeV7 fill 48 bits time (uuid[0] - uuid[5]), set version b0111 (uuid[6])
 | 
				
			||||||
// uuid[8] already has the right version number (Variant is 10)
 | 
					// uuid[8] already has the right version number (Variant is 10)
 | 
				
			||||||
// see function  NewV7 and NewV7FromReader
 | 
					// see function NewV7 and NewV7FromReader
 | 
				
			||||||
func makeV7(uuid []byte) {
 | 
					func makeV7(uuid []byte) {
 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
		 0                   1                   2                   3
 | 
							 0                   1                   2                   3
 | 
				
			||||||
@@ -52,7 +52,7 @@ func makeV7(uuid []byte) {
 | 
				
			|||||||
		+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | 
							+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | 
				
			||||||
		|                           unix_ts_ms                          |
 | 
							|                           unix_ts_ms                          |
 | 
				
			||||||
		+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | 
							+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | 
				
			||||||
		|          unix_ts_ms           |  ver  |       rand_a          |
 | 
							|          unix_ts_ms           |  ver  |  rand_a (12 bit seq)  |
 | 
				
			||||||
		+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | 
							+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | 
				
			||||||
		|var|                        rand_b                             |
 | 
							|var|                        rand_b                             |
 | 
				
			||||||
		+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | 
							+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | 
				
			||||||
@@ -61,7 +61,7 @@ func makeV7(uuid []byte) {
 | 
				
			|||||||
	*/
 | 
						*/
 | 
				
			||||||
	_ = uuid[15] // bounds check
 | 
						_ = uuid[15] // bounds check
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	t := timeNow().UnixMilli()
 | 
						t, s := getV7Time()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	uuid[0] = byte(t >> 40)
 | 
						uuid[0] = byte(t >> 40)
 | 
				
			||||||
	uuid[1] = byte(t >> 32)
 | 
						uuid[1] = byte(t >> 32)
 | 
				
			||||||
@@ -70,6 +70,35 @@ func makeV7(uuid []byte) {
 | 
				
			|||||||
	uuid[4] = byte(t >> 8)
 | 
						uuid[4] = byte(t >> 8)
 | 
				
			||||||
	uuid[5] = byte(t)
 | 
						uuid[5] = byte(t)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	uuid[6] = 0x70 | (uuid[6] & 0x0F)
 | 
						uuid[6] = 0x70 | (0x0F & byte(s>>8))
 | 
				
			||||||
	// uuid[8] has already has right version
 | 
						uuid[7] = byte(s)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// lastV7time is the last time we returned stored as:
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
 | 
					//	52 bits of time in milliseconds since epoch
 | 
				
			||||||
 | 
					//	12 bits of (fractional nanoseconds) >> 8
 | 
				
			||||||
 | 
					var lastV7time int64
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const nanoPerMilli = 1000000
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// getV7Time returns the time in milliseconds and nanoseconds / 256.
 | 
				
			||||||
 | 
					// The returned (milli << 12 + seq) is guarenteed to be greater than
 | 
				
			||||||
 | 
					// (milli << 12 + seq) returned by any previous call to getV7Time.
 | 
				
			||||||
 | 
					func getV7Time() (milli, seq int64) {
 | 
				
			||||||
 | 
						timeMu.Lock()
 | 
				
			||||||
 | 
						defer timeMu.Unlock()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						nano := timeNow().UnixNano()
 | 
				
			||||||
 | 
						milli = nano / nanoPerMilli
 | 
				
			||||||
 | 
						// Sequence number is between 0 and 3906 (nanoPerMilli>>8)
 | 
				
			||||||
 | 
						seq = (nano - milli*nanoPerMilli) >> 8
 | 
				
			||||||
 | 
						now := milli<<12 + seq
 | 
				
			||||||
 | 
						if now <= lastV7time {
 | 
				
			||||||
 | 
							now = lastV7time + 1
 | 
				
			||||||
 | 
							milli = now >> 12
 | 
				
			||||||
 | 
							seq = now & 0xfff
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						lastV7time = now
 | 
				
			||||||
 | 
						return milli, seq
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										2
									
								
								vendor/modules.txt
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								vendor/modules.txt
									
									
									
									
										vendored
									
									
								
							@@ -420,7 +420,7 @@ github.com/google/gofuzz/bytesource
 | 
				
			|||||||
# github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
 | 
					# github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
 | 
				
			||||||
## explicit; go 1.13
 | 
					## explicit; go 1.13
 | 
				
			||||||
github.com/google/shlex
 | 
					github.com/google/shlex
 | 
				
			||||||
# github.com/google/uuid v1.5.0
 | 
					# github.com/google/uuid v1.6.0
 | 
				
			||||||
## explicit
 | 
					## explicit
 | 
				
			||||||
github.com/google/uuid
 | 
					github.com/google/uuid
 | 
				
			||||||
# github.com/gorilla/mux v1.8.0
 | 
					# github.com/gorilla/mux v1.8.0
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user