Giter VIP home page Giter VIP logo

go-spdx's Introduction

go-spdx

The package parses SPDX license expression strings describing license terms

PkgGoDev Go Report Card Coverage Status Release

Install

go get github.com/kyoh86/go-spdx

Usage

See example or test

Updating licenses

In order to update the licenses_asset.go file with the newest license list from SPDX, execute the following commands:

cd spdx
npm install spdx-license-list@latest
make licenses-asset

(You should also add a test to spdx/parser_test.go to make sure everything worked as expected.)

LICENSE

MIT License

This is distributed under the MIT License.

go-spdx's People

Contributors

alranel avatar bfabio avatar kyoh86 avatar yamada-wacul avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

go-spdx's Issues

Doesn't work on Windows?

Hi, we're using go-spdx over at https://github.com/italia/publiccode-parser-go. It looks like the assets don't get embedded on Windows, for some reason:

C:\Users\fabio>go install github.com/italia/publiccode-parser-go/v2/pcvalidate@latest

C:\Users\fabio>pcvalidate
panic: specified file is not found

goroutine 1 [running]:
github.com/kyoh86/go-spdx/spdx.init.0()
        C:/Users/fabio/go/pkg/mod/github.com/kyoh86/[email protected]/spdx/licenses.go:26 +0x21a

Not a big issue anyway, because Windows support is low priority for us.

Use GitHub Actions

  • yo go-project --projectName ${PWD##*/} --author ${${PWD%/*}##*/} --license MIT --dir ${PWD}
  • git rm -rf .circleci
  • sudo rm -rf "$(go env GOPATH)/pkg" && go get -v -d -t ./... && go mod tidy
  • git add -p and git commit -m "Replace Circle-CI with GitHub Actions"
  • Set CODECOV_TOKEN and GORELEASER_GITHUB_TOKEN on repository

Support the + operator

As of SPDX 2.0, a + operator can be appended to the identifiers of all non-GNU licenses in order to include the later versions (example: MPL-2.0+).
This parser library does not currently support such sintax.

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.