Warning
This repostitory is experimental and still under development.
Now, you can check when time.Now()
is called in the same function which calls spanner.Insert
or spanner.Update
.
Nowdet is a tool to detect time.Now()
in your code is inserted to allow_commit_timestamp
column in Spanner. This condition leads a problem that the timestamp generated by time.Now()
is more proceeded than one in Spanner. It violates the constraint of Spanner.
go install github.com/artoy/nowdet@latest
Please specify a function name you want to check and a package name which contains it.
nowdet --pkg <package name> --func <function name>