simplify struct definition

Written by
Link to Post

https://www.reddit.com/r/golang/comments/byuw2v/simplify_struct_definition/ by 

statusInfo := StatusInfoSDK{}

systemLogEntries := []SystemLogEx{}

diskInfoDetails := []DiskInfo{DiskInfo{[48]byte{}, ConvertSiteNameAsBytes(SimulatorRequestInputRecords.SiteName), [32]DiskSmartAttribute{DiskSmartAttribute{}}, 0}} AdminCollectData := AdminCollectData{SimulatorRequestInputRecords, 0, “1.7.1”, “HD16”, CountCharactersInString(SimulatorRequestInputRecords.SiteName), DateTime{75, 1, GetEpochTime()}, diskInfoDetails, systemLogEntries, statusInfo}

Here,ADminCollectData struct definition becomes too large . how can I simplify it?

submitted by /u/tholisam
[link] [comments]

Article Tags:
· ·
Article Categories:
reddit

Leave a Reply