Moved to https://kgoralski.github.io/
GitHub Pages & Hugo (written with Go language)
Moved to https://kgoralski.github.io/
GitHub Pages & Hugo (written with Go language)
Just wrote something small with Go Language. Simple CRUD/webservice with MySQL using gorilla mux and sqlx, but it is almost plain golang. If anything wrong about it, tell me 😉
https://github.com/kgoralski/go-crud-template
Here are my impressions about it:
Links:
Very good parsing library.
Official Website
Univocity Parsers – Maven Repository
public class ExampleCsvToPojoParser { private final Logger logger = LoggerFactory.getLogger(CsvToPojoParser.class); public <T> List<T> parseFileToPojo(Class<T> clazz, String fileName) { BeanListProcessor<T> rowProcessor = new BeanListProcessor<T>(clazz); CsvParserSettings parserSettings = new CsvParserSettings(); parserSettings.setRowProcessor(rowProcessor); parserSettings.setHeaderExtractionEnabled(true); parserSettings.setLineSeparatorDetectionEnabled(true); parserSettings.setSkipEmptyLines(true); CsvParser parser = new CsvParser(parserSettings); try (InputStream resourceAsStream = this.getClass().getClassLoader().getResourceAsStream(fileName)) { parser.parse(resourceAsStream); } catch (IOException e) { logger.error("Cannot read file " + fileName, e ); } return rowProcessor.getBeans(); } }
Then you can put there class like this (which will match the file):
public class Users { @Trim @NullString(nulls = { " ", "" }) @Parsed(field = "USER_ID") private Long userId; @Trim @NullString(nulls = { " ", "" }) @Parsed(field = "USER_NAME") private String userName; //getters & setters }
Really. You must read it.
So, here is my recommendation how to get Linux Workstation for (Java) development with only little knowledge of Linux.