update code
This commit is contained in:
		
							parent
							
								
									c59d801434
								
							
						
					
					
						commit
						565bcca4f0
					
				
							
								
								
									
										2
									
								
								go.mod
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								go.mod
									
									
									
									
									
								
							@ -4,7 +4,7 @@ go 1.20
 | 
			
		||||
 | 
			
		||||
require (
 | 
			
		||||
	b612.me/stardb v1.1.4
 | 
			
		||||
	b612.me/startimer v0.0.0-20230529074834-557abef590fe
 | 
			
		||||
	b612.me/startimer v0.0.0-20230529085949-3ec2007a7d4f
 | 
			
		||||
	github.com/glebarez/go-sqlite v1.21.1
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										4
									
								
								go.sum
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								go.sum
									
									
									
									
									
								
							@ -1,7 +1,7 @@
 | 
			
		||||
b612.me/stardb v1.1.4 h1:Ic+CwGZpDKtgHTkDJ5/1kxgEEGM9Hj5xu9i0n6CbXfs=
 | 
			
		||||
b612.me/stardb v1.1.4/go.mod h1:qtGEu+joEQxFESl3tse5xqiD767f6sAmHD284+Xoy48=
 | 
			
		||||
b612.me/startimer v0.0.0-20230529074834-557abef590fe h1:Hy9hkSPiWjWvui6kiAvIShP1ZaPNT9fVJCHq5e4tZPk=
 | 
			
		||||
b612.me/startimer v0.0.0-20230529074834-557abef590fe/go.mod h1:7YlIWMVBIxLObVI0Ls+CMCCVZJ+4DdTaqF2TshthZjk=
 | 
			
		||||
b612.me/startimer v0.0.0-20230529085949-3ec2007a7d4f h1:J+NFN1iuLNSZAjhZ39VPRX0gdbcHUltZbQc7wkJZs2o=
 | 
			
		||||
b612.me/startimer v0.0.0-20230529085949-3ec2007a7d4f/go.mod h1:7YlIWMVBIxLObVI0Ls+CMCCVZJ+4DdTaqF2TshthZjk=
 | 
			
		||||
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
 | 
			
		||||
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
 | 
			
		||||
github.com/glebarez/go-sqlite v1.21.1 h1:7MZyUPh2XTrHS7xNEHQbrhfMZuPSzhkm2A1qgg0y5NY=
 | 
			
		||||
 | 
			
		||||
@ -172,7 +172,7 @@ func matchPeriodPattern01(base time.Time, str string) (startimer.StarTimer, erro
 | 
			
		||||
					now = now.Add(time.Duration(sr.Value) * time.Second)
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
			return startimer.NewTimer(time.Now(), startimer.WithStaticDate(now), startimer.WithRunCountLimit(count)), nil
 | 
			
		||||
			return startimer.NewTimer(time.Now(), startimer.WithStaticDate(now), startimer.WithRunCountLimit(count))
 | 
			
		||||
		}
 | 
			
		||||
		if duration.Seconds() > 0 {
 | 
			
		||||
			rpt.Repeat = append(rpt.Repeat, startimer.Repeat{Unit: startimer.STAR_SECOND, Value: uint32(duration.Seconds())})
 | 
			
		||||
@ -180,7 +180,7 @@ func matchPeriodPattern01(base time.Time, str string) (startimer.StarTimer, erro
 | 
			
		||||
		if rpt.Every == setAsDate {
 | 
			
		||||
			rpt.Every = false
 | 
			
		||||
		}
 | 
			
		||||
		return startimer.NewTimer(base, startimer.WithRepeats(&rpt), startimer.WithRunCountLimit(count)), nil
 | 
			
		||||
		return startimer.NewTimer(base, startimer.WithRepeats(&rpt), startimer.WithRunCountLimit(count))
 | 
			
		||||
	}
 | 
			
		||||
	return startimer.StarTimer{}, errors.New("no Match")
 | 
			
		||||
}
 | 
			
		||||
@ -268,7 +268,7 @@ func matchPeroidPattern02(base time.Time, str string) (startimer.StarTimer, erro
 | 
			
		||||
		if pts[1] != "" {
 | 
			
		||||
			count = 0
 | 
			
		||||
		}
 | 
			
		||||
		return startimer.NewTimer(base, startimer.WithRepeats(&rpt), startimer.WithRunCountLimit(count)), nil
 | 
			
		||||
		return startimer.NewTimer(base, startimer.WithRepeats(&rpt), startimer.WithRunCountLimit(count))
 | 
			
		||||
	}
 | 
			
		||||
	return startimer.StarTimer{}, errors.New("no Match")
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user