fix: setting last run when true

improve(dev): set mount volume to speed up dev container start
This commit is contained in:
Suyono 2023-12-08 15:13:40 +11:00
parent 2971f5c709
commit d9d1fe72d4
8 changed files with 46 additions and 11 deletions

View File

@ -1,6 +1,18 @@
{
"name": "Golang Dev",
"image": "golang-dev:1.21-bookworm-user",
"mounts": [
{
"source": "WingmateGoPath",
"target": "/go",
"type": "volume"
},
{
"source": "WingmateGolangDevHome",
"target": "/home/golang",
"type": "volume"
}
],
"customizations": {
"vscode": {
"extensions": [

3
.gitignore vendored
View File

@ -1,2 +1 @@
/.idea
/wingmate
/cmd/wingmate/wingmate

8
.idea/.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

8
.idea/modules.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/wingmate.iml" filepath="$PROJECT_DIR$/.idea/wingmate.iml" />
</modules>
</component>
</project>

6
.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

9
.idea/wingmate.iml Normal file
View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="Go" enabled="true" />
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@ -1 +1 @@
golang 1.21.4
golang 1.21.5

View File

@ -28,14 +28,6 @@ type CronTimeSpec interface {
Match(uint8) bool
}
// type Cron interface {
// Minute() CronTimeSpec
// Hour() CronTimeSpec
// DayOfMonth() CronTimeSpec
// Month() CronTimeSpec
// DayOfWeek() CronTimeSpec
// }
type Cron struct {
minute CronTimeSpec
hour CronTimeSpec
@ -149,6 +141,7 @@ func (c *Cron) TimeToRun(now time.Time) bool {
c.dom.Match(uint8(now.Day())) &&
c.month.Match(uint8(now.Month())) &&
c.dow.Match(uint8(now.Weekday())) {
c.lastRun = now
return true
}