go

module
v0.0.0-...-6093358 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2022 License: GPL-3.0

README

parsing-exercise golang

Golang solution to parsing-exercise.

Requirements

  • go version 1.18 and above

Installation

First, run tests by running the following from this directory.

go test ./...

Make sure all tests are passing.

Then, build the command line took by running the following from this directory.

go build -o parse ./cmd

An executable parse will be created in this directory.

Run on Example Files

Run the following to parse the example files.

mkdir output
./parse ../../files ./output

You should see the following logged to stdout:

2022/11/15 09:47:43 starting workflow...
2022/11/15 09:47:43 loading input001.json
2022/11/15 09:47:43 loading input002.json
2022/11/15 09:47:43 loading input003.json
2022/11/15 09:47:43 processing input001.json
2022/11/15 09:47:43 processing input002.json
2022/11/15 09:47:43 writing input001.json
2022/11/15 09:47:43 processing input003.json
2022/11/15 09:47:43 error processing input003.json
2022/11/15 09:47:43 writing input002.json
2022/11/15 09:47:43 success!

You should also find input001.json and input002.json in the output folder of the parsed output.

Clean Up

Run the following to clean up.

rm -rf ./output
rm parse

Directories

Path Synopsis
pkg
io

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL