This file contains hidden or 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
| #!/bin/sh | |
| commit_msg_file=$1 | |
| commit_msg=$(cat "$commit_msg_file") | |
| date_regex="^[0-9]{4}-[0-9]{2}-[0-9]{2}" | |
| if ! echo "$commit_msg" | grep -qE "$date_regex"; then | |
| echo "Error: commit message must start with a date in YYYY-MM-DD format." | |
| exit 1 | |
| fi |
This file contains hidden or 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
| type ReadCacheProxy[Input, ViewModel any] struct { | |
| ReadCache func(input *Input) (output *ViewModel, err error) | |
| ReadDatabase func(input *Input) (output *ViewModel, err error) | |
| WriteCache func(output *ViewModel) error | |
| Key string | |
| Locks *sync.Map | |
| } |
OlderNewer