Giter Site home page Giter Site logo

ikkerens / ikeapack Goto Github PK

View Code? Open in Web Editor NEW
20.0 20.0 3.0 88 KB

Compact data serializer/packer written in Go, intended to produce a cross-language usable format.

License: MIT License

Go 100.00%
compression cross-language go golang golang-library hacktoberfest serialization serialization-library serialize serializer

ikeapack's People

Contributors

ikkerens avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ikeapack's Issues

better errors

Currently the error can be seen as:

panic: Attempting to marshal nil value

goroutine 1 [running]:
github.com/ikkerens/ikeapack.(*pointerWrapper).writeVariable(0xc00000e6a0, 0x67f320, 0xc0000929c0, 0x5e0060, 0xc000452100, 0x196, 0x608ea0, 0x5d2913)
        /home/anders/go/pkg/mod/github.com/ikkerens/[email protected]/pointer.go:41 +0x1ef
github.com/ikkerens/ikeapack.handleVariableWriter(0x67f320, 0xc0000929c0, 0x67f480, 0xc00000e6a0, 0x5e0060, 0xc000452100, 0x196, 0x5ff2a0, 0xc0000bf530)
        /home/anders/go/pkg/mod/github.com/ikkerens/[email protected]/variablehandlers.go:38 +0x1ea
github.com/ikkerens/ikeapack.(*variableStructReadWriter).writeVariable(0xc00000e7e0, 0x67f320, 0xc0000929c0, 0x6263e0, 0xc000452100, 0x199, 0x6786b4, 0xf9)
        /home/anders/go/pkg/mod/github.com/ikkerens/[email protected]/struct.go:194 +0xe1
github.com/ikkerens/ikeapack.handleVariableWriter(0x67f320, 0xc0000929c0, 0x67f520, 0xc00000e7e0, 0x6263e0, 0xc000452100, 0x199, 0x4b492d, 0xc0000202a0)
        /home/anders/go/pkg/mod/github.com/ikkerens/[email protected]/variablehandlers.go:38 +0x1ea
github.com/ikkerens/ikeapack.Pack(0x67f320, 0xc0000929c0, 0x5ff2a0, 0xc000452100, 0x67f720, 0xc0000929f0)
        /home/anders/go/pkg/mod/github.com/ikkerens/[email protected]/public.go:27 +0x121
main.saveToFile(0xc000452100, 0xc0000929c0)
        /home/anders/dev/onitamago/cmd/abacus/work.go:162 +0x2c3
main.startWork(0x1, 0xa, 0xc0000bf8b8, 0x1, 0x1)
        /home/anders/dev/onitamago/cmd/abacus/work.go:84 +0x50a
main.glob..func3(0xc0000a0420, 0x0, 0xc0000a0420)
        /home/anders/dev/onitamago/cmd/abacus/work.go:69 +0x33b
github.com/urfave/cli.HandleAction(0x5f4ac0, 0x648188, 0xc0000a0420, 0xc000072300, 0x0)
        /home/anders/go/pkg/mod/github.com/urfave/[email protected]/app.go:490 +0xc8
github.com/urfave/cli.Command.Run(0x63b609, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x64645f, 0x36, 0x0, ...)
        /home/anders/go/pkg/mod/github.com/urfave/[email protected]/command.go:210 +0x996
github.com/urfave/cli.(*App).Run(0xc00009c680, 0xc000012100, 0x4, 0x4, 0x0, 0x0)
        /home/anders/go/pkg/mod/github.com/urfave/[email protected]/app.go:255 +0x6af
main.main()
        /home/anders/dev/onitamago/cmd/abacus/app.go:39 +0x3bd

Which yields no information about what is actually wrong here. Does the reflect package allow to print the field name or type?

add ignore option

When saving a nil slice, it would be nice to have an ignore flag such that ikeapack initializes the empty slice so that I do not have to, instead of getting a nil panic. If that is not the current case.

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.