GithubHelp home page GithubHelp logo

csv2md's Introduction

Hi there 👋

csv2md's People

Contributors

uchiiii avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

csv2md's Issues

unexpected error

input csv:

First Name,Last Name,Location,Allegiance
Mance,Rayder,North of the Wall,Wildlings
Margaery,Tyrell,"[\"The Reach\"
]",House Tyrell
Danerys,Targaryen,Meereen,House Targaryen
Tyrion,Lannister,King's Landing,House Lannister

error:

2020/05/18 22:25:17 record on line 3: wrong number of fields

empty csv results in panic.

Empty csv ends up with panic.

output:

panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
main.colMaxSize(0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/Users/horiuchiryousuke/go/src/github.com/uchiiii/csv2md/convert.go:107 +0x14a
main.ArrayToMd(0x0, 0x0, 0x0, 0xc0000a23c0, 0x0, 0x0, 0x0, 0x0)
	/Users/horiuchiryousuke/go/src/github.com/uchiiii/csv2md/convert.go:61 +0x5a
main.Convert(0x7ffeefbff63f, 0x3f, 0xc0000a23c0, 0x1181f57, 0xc0000a23c0, 0x0, 0x0)
	/Users/horiuchiryousuke/go/src/github.com/uchiiii/csv2md/convert.go:38 +0xb1
main.ConvertAll(0xc0000a23c0, 0x0, 0x0)
	/Users/horiuchiryousuke/go/src/github.com/uchiiii/csv2md/convert.go:18 +0x74
main.main.func1(0xc0000c4440, 0x7ffeefbff63f, 0x3f)
	/Users/horiuchiryousuke/go/src/github.com/uchiiii/csv2md/main.go:40 +0xcc
github.com/urfave/cli/v2.(*App).RunContext(0xc000122000, 0x122b480, 0xc0000a0008, 0xc0000ae000, 0x2, 0x2, 0x0, 0x0)
	/Users/horiuchiryousuke/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:315 +0x6be
github.com/urfave/cli/v2.(*App).Run(...)
	/Users/horiuchiryousuke/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:215
main.main()
	/Users/horiuchiryousuke/go/src/github.com/uchiiii/csv2md/main.go:49 +0x39a

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.