Skip to content
Permalink
Browse files

adding -o flag to example command

  • Loading branch information...
jahzielv committed Jun 29, 2019
1 parent f5707bb commit 80a4416bbd58d5412ee7a7c9af96f0145069ddbe
Showing with 267 additions and 8 deletions.
  1. +220 −0 .examples/hello.json
  2. +4 −0 cmd/generate_example.go
  3. +5 −8 go.mod
  4. +38 −0 go.sum
@@ -0,0 +1,220 @@
{
"core": {
"title": "Software Engineer",
"workArea": "Munich Citycenter + 20kms",
"livingArea": "Germany",
"optionalKey": "foo"
},
"optionalData": {
"one": "two",
"foo": "bar"
},
"optionalData1": {
"one": "two",
"foo": "bar"
},
"optionalData2": {
"one": "two",
"foo": "bar"
},
"personal": {
"name": "John Doe",
"gender": "male",
"image": "example.com/Abcxyz",
"email": "lucas@example.com",
"phone": "912-217-7923",
"url": "http://www.example.com/",
"summary": "The man who sold the world!",
"currentLocation": {
"lat": 35.712758,
"long": 51.392114
},
"permanentLocation": {
"lat": 35.712758,
"long": 51.392114
},
"birthday": "1995-02-14",
"birthPlace": "Munich",
"profiles": [
{
"network": "github",
"username": "john_doe",
"url": "https://github.com/john_doe"
}
],
"relationshipStatus": "married",
"postalAddress": "John Doe, Wittekindshof, Schulstrasse 4, 32547 Bad Oyenhausen, Germany"
},
"work": [
{
"name": "XYZ Inc",
"description": "A social media company",
"position": "Software Engineer",
"location": {
"lat": 35.712758,
"long": 51.392114
},
"url": "http://xyz.example.com",
"startDate": "2017-12-29",
"endDate": "2018-12-29",
"summary": "Developing and maintaining the company website using syna",
"highlights": [
"Worked with mobile team at Twitter to develop remote debugging tools for mobile browsers"
]
}
],
"education": [
{
"institution": "XYZ Institute of Technology",
"location": {
"lat": 35.712758,
"long": 51.392114
},
"area": "Engineering",
"studyType": "Bachelor",
"startDate": "2017-06-28",
"endDate": "2013-06-28",
"score": {
"type": "GPA",
"value": "3.4",
"best": "4",
"worst": "0"
},
"courses": ["CS302 - Introduction to Algorithms"],
"honors": ["Magna Cum Laude"],
"highlights": ["Live abroad within a new culture"]
}
],
"volunteer": [
{
"organization": "Xyz",
"position": "Open Source Contributor",
"location": {
"lat": 35.712758,
"long": 51.392114
},
"url": "http://xyz.example.com",
"startDate": "2014-06-29",
"endDate": "2017-06-29",
"summary": "Frontend developer",
"highlights": ["Invited as a speaker in Xyzcon'17"]
}
],
"publications": [
{
"name": "Deep learning and Artificial Intelligence",
"publisher": "XYZ, Computer Magazine",
"releaseDate": "2015-08-01",
"resources": [
{
"url": "http://www.example.com/my-example-slides/",
"label": "Slides"
}
],
"url": "http://www.computer.org.example.com/csdl/mags/co/2015/10/rx069-abs.html",
"summary": "Discussion of the advent of deep learning and artificial intelligence"
}
],
"legal": [
{
"name": "XYZ's patent on LZW compression, a fundamental part of the widely used GIF graphics format",
"legalType": "Patent, Trademark, Copyright",
"description": "Some legal document!",
"applicationDate": "2015-08-01",
"grantDate": "2016-09-01",
"endDate": "2020-09-03",
"resources": [
{
"url": "http://www.example.com/my-example-slides/",
"label": "Slides"
}
],
"idNumber": "JP2004369746A",
"currentAssignee": "John Doe",
"previousAssignee": "John Doe",
"author": "John Doe",
"coAuthors": "John Doe"
}
],
"skills": [
{
"name": "Web Development",
"proficiency": "advanced",
"keywords": ["HTML"]
}
],
"awards": [
{
"title": "Awarded Software Process Achievement Award",
"date": "2016-06-12",
"awarder": "IEEE",
"summary": "Received for my work in Deep learning and AI"
}
],
"projects": [
{
"name": "File Transfer application",
"location": {
"lat": 35.712758,
"long": 51.392114
},
"description": "Developed a client and server based application",
"highlights": ["used Java AWT and Swing for client side userinterface"],
"keywords": ["Java"],
"startDate": "2016-06-29",
"endDate": "2017-03-02",
"resources": [
{
"url": "http://www.example.com/my-example-slides/",
"label": "Slides"
}
],
"url": "http://www.example.org/csdl/mags/co/1996/10/rx069-abs.html",
"roles": ["Team Lead"],
"entity": "greenpeace",
"type": "volunteering"
}
],
"certificate": [
{
"code": "1Z0-062",
"name": "XYZ Certified Application Specialist (MCAS)",
"website": "http://www.example.org",
"verification": "http://www.example.org",
"grantDate": "2017-06-29",
"score": {
"type": "GPA",
"value": "3.4",
"best": "4",
"worst": "0"
},
"endDate": "2017-06-29",
"doesNotExpire": true
}
],
"references": [
{
"name": "Stephan Mark",
"company": "Xyz",
"position": "Senior Software Engineer",
"reference": "Joe blogs was a great employee, who turned up to work at least once a week. He exceeded my expectations when it came to doing nothing."
}
],
"languages": [
{
"language": "English",
"level": "fluent"
}
],
"interests": [
{
"name": "Machine Learning",
"keywords": ["Neural Networks"]
}
],
"meta": {
"version": "v1.0.0",
"lastModified": "2017-06-29T15:53:01+01:00",
"uuid": "078c39ce-23ee-4970-9637-c07379132dce"
}
}
@@ -9,6 +9,9 @@ import (
"github.com/spf13/cobra"
)

// Flag to specify output
var output string

func generateExampleRun(cmd *cobra.Command, args []string) error {
var examplePath string
if len(args) == 0 {
@@ -40,5 +43,6 @@ var generateExampleCmd = &cobra.Command{
}

func init() {
generateExampleCmd.Flags().StringVarP(&output, "output", "o", "resume_example.json", "Specify a custom output file for example resume data.")
generateCmd.AddCommand(generateExampleCmd)
}
13 go.mod
@@ -3,21 +3,18 @@ module github.com/resumic/schema
require (
github.com/emirpasic/gods v1.12.0 // indirect
github.com/gobuffalo/events v1.1.8 // indirect
github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0
github.com/gobuffalo/packr/v2 v2.2.0
github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e // indirect
github.com/gobuffalo/packd v0.3.0
github.com/gobuffalo/packr/v2 v2.5.2
github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754 // indirect
github.com/gohugoio/hugo v0.49.2
github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect
github.com/kr/pty v1.1.4 // indirect
github.com/markbates/inflect v1.0.4 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/spf13/cobra v0.0.3
github.com/spf13/cobra v0.0.5
github.com/stretchr/objx v0.2.0 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.1.0
golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5 // indirect
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 // indirect
golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67 // indirect
gopkg.in/src-d/go-billy.v4 v4.3.0 // indirect
gopkg.in/src-d/go-git-fixtures.v3 v3.3.0 // indirect
gopkg.in/src-d/go-git.v4 v4.9.1

0 comments on commit 80a4416

Please sign in to comment.
You can’t perform that action at this time.