Git Product home page Git Product logo

go-stringify's Introduction

CircleCI Go Report Card PkgGoDev License

go-stringify

Description

go-stringify is a simple library for generating a stringer that converts literals to strings, converts map keys to strings, or converts a slice to a slice of strings. go-stringify is used by go-simple-serializer.

Usage

Go

You can import go-stringify as a library with:

import (
  "github.com/spatialcurrent/go-stringify/pkg/stringify"
)

The easiest pattern is to use the NewStringer(noDataValue string, decimal bool, lower bool, upper bool) constructor to create a stringer function.

stringer := NewStringer("-", true, false, false)
...
str := stringer(obj)

See stringify in the docs for information on how to use Go API.

Testing

To run Go tests using make test_go or (bash scripts/test.sh), which runs unit tests, go vet, go vet with shadow, errcheck, staticcheck, and misspell.

Contributing

Spatial Current, Inc. is currently accepting pull requests for this repository. We'd love to have your contributions! Please see Contributing.md for how to get started.

License

This work is distributed under the MIT License. See LICENSE file.

go-stringify's People

Contributors

pjdufour avatar

Watchers

James Cloos avatar  avatar

go-stringify's Issues

CLA

I, Patrick Dufour (@pjdufour), agree to the license terms. My contributions to this repo are granted to Spatial Current, Inc. under a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable license and/or copyright is transferred.

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.