Append to a file in Go

This answers works in Go1: f, err := os.OpenFile(filename, os.O_APPEND|os.O_WRONLY|os.O_CREATE, 0600) if err != nil { panic(err) } defer f.Close() if _, err = f.WriteString(text); err != nil { panic(err) }

Write extracted data to a file using jmeter

Just solved a similar problem. After getting the data using a regular expression extractor, add a BeanShell PostProcessor element. Use the code below to write the variables to a file: name = vars.get(“name”); email = vars.get(“email”); log.info(email); // if you want to log something to jmeter.log file // Pass true if you want to append … Read more