Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/seferim-agi-g16 / tools/check_signals/main.go |
| Date | Not specified in source |
| Repository | Janady13/seferim-agi-g16 |
| Revision | 25f281b08b2f786f5a235b5abebfc39bf44d1044 |
| Branch | main |
| Path or archive member | tools/check_signals/main.go |
| Original SHA-256 | 633c9019ce110ebc1eecc1f70941c44c91b439a0072ed0ad36f5463dcf981fc0 |
| Git blob SHA | b977bed9105dc9bfebe491ffcdac68d13084c916 |
| Reading-copy SHA-256 | 633c9019ce110ebc1eecc1f70941c44c91b439a0072ed0ad36f5463dcf981fc0 |
Every recorded occurrence
These 2 records contain identical original source bytes. Their paths and revisions remain part of the archive.
| Original record | Branch or archive | Revision / identifier | Original location |
|---|---|---|---|
| Janady13/seferim-agi-g16 / tools/check_signals/main.go | main | 25f281b08b2f786f5a235b5abebfc39bf44d1044 | Open original |
| Janady13/seferim-agi-g16 / tools/check_signals/main.go | copilot/update-code-libraries | 393af96a270295f79582b2b2a77bb49dd1a9a990 | Open original |
Recovered source transcript
Download complete source text ↓39 lines · 0.7 KB
package main
import (
"encoding/json"
"fmt"
"os"
)
type S struct {
DxNorm *float64 `json:"dx_norm"`
EdError *float64 `json:"ed_error"`
Utility *float64 `json:"utility"`
Stability *float64 `json:"stability"`
}
func main() {
if len(os.Args) < 2 {
fmt.Fprintf(os.Stderr, "usage: check_signals <signals.json>\n")
os.Exit(2)
}
b, err := os.ReadFile(os.Args[1])
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
var s S
if err := json.Unmarshal(b, &s); err != nil {
fmt.Fprintf(os.Stderr, "invalid JSON: %v\n", err)
os.Exit(3)
}
ok := s.DxNorm != nil && s.EdError != nil && s.Utility != nil && s.Stability != nil
if !ok {
fmt.Fprintf(os.Stderr, "missing required keys\n")
os.Exit(4)
}
fmt.Println("ok")
}