Add GoString method for jobmeta

This commit is contained in:
Jan Eitzinger 2025-05-16 17:19:56 +02:00
parent fe1ff5c7a3
commit 432e06e801

View File

@ -145,7 +145,12 @@ const (
JobStateOutOfMemory JobState = "out_of_memory" JobStateOutOfMemory JobState = "out_of_memory"
) )
func (e *JobState) UnmarshalGQL(v interface{}) error { func (j JobMeta) GoString() string {
return fmt.Sprintf("JobMeta{ID:%d, StartTime:%d, JobID:%v, BaseJob:%v}",
j.ID, j.StartTime, j.JobID, j.BaseJob)
}
func (e *JobState) UnmarshalGQL(v any) error {
str, ok := v.(string) str, ok := v.(string)
if !ok { if !ok {
return fmt.Errorf("SCHEMA/JOB > enums must be strings") return fmt.Errorf("SCHEMA/JOB > enums must be strings")