mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
17 lines
332 B
Go
17 lines
332 B
Go
package main
|
|
|
|
import (
|
|
"encoding/json"
|
|
"fmt"
|
|
sq "github.com/Masterminds/squirrel"
|
|
)
|
|
|
|
func save(id string, version interface{}) {
|
|
versionJSON, _ := json.Marshal(version)
|
|
sq.StatementBuilder.
|
|
Insert("resources").
|
|
Columns("resource_id", "version_md5").
|
|
Values(id, sq.Expr(fmt.Sprintf("md5('%s')", versionJSON))).
|
|
Exec()
|
|
}
|