mirror of
				https://github.com/k3s-io/kubernetes.git
				synced 2025-10-31 05:40:42 +00:00 
			
		
		
		
	feat: bump github.com/prometheus/common to v0.4.1
This commit is contained in:
		
							
								
								
									
										1
									
								
								vendor/github.com/prometheus/common/model/metric.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								vendor/github.com/prometheus/common/model/metric.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -21,7 +21,6 @@ import ( | ||||
| ) | ||||
|  | ||||
| var ( | ||||
| 	separator = []byte{0} | ||||
| 	// MetricNameRE is a regular expression matching valid metric | ||||
| 	// names. Note that the IsValidMetricName function performs the same | ||||
| 	// check but faster than a match with this regular expression. | ||||
|   | ||||
							
								
								
									
										8
									
								
								vendor/github.com/prometheus/common/model/time.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								vendor/github.com/prometheus/common/model/time.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -150,7 +150,13 @@ func (t *Time) UnmarshalJSON(b []byte) error { | ||||
| 			return err | ||||
| 		} | ||||
|  | ||||
| 		*t = Time(v + va) | ||||
| 		// If the value was something like -0.1 the negative is lost in the | ||||
| 		// parsing because of the leading zero, this ensures that we capture it. | ||||
| 		if len(p[0]) > 0 && p[0][0] == '-' && v+va > 0 { | ||||
| 			*t = Time(v+va) * -1 | ||||
| 		} else { | ||||
| 			*t = Time(v + va) | ||||
| 		} | ||||
|  | ||||
| 	default: | ||||
| 		return fmt.Errorf("invalid time %q", string(b)) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user