func()

in lib/ec2macosinit/fatalcount.go [60:74]


func (r *FatalCount) readFatalFile() (err error) {
	// Read the contents into bytes
	countsBytes, err := os.ReadFile(fatalCountFile)
	if err != nil {
		return fmt.Errorf("ec2macosinit: Failed to read %s: %s", fatalCountFile, err)
	}

	// Unmarshal to the struct
	err = json.Unmarshal(countsBytes, &r)
	if err != nil {
		return fmt.Errorf("ec2macosinit: Failed to parse json: %s", err)
	}

	return nil
}