Comments (7)
Should resolve that.
from lc.
diff --git parsers/guesser.go parsers/guesser.go
index 1f55738..eeac0fa 100644
--- parsers/guesser.go
+++ parsers/guesser.go
@@ -299,7 +299,7 @@ func processFile(directory string, file string, rootLicenses []LicenseMatch) Fil
Md5Hash: getMd5Hash(content),
Sha1Hash: getSha1Hash(content),
Sha256Hash: getSha256Hash(content),
- BytesHuman: bytesToHuman(len(content)),
+ BytesHuman: bytesToHuman(int64(len(content))),
Bytes: len(content)}
return fileResult
diff --git parsers/helpers.go parsers/helpers.go
--- parsers/helpers.go
+++ parsers/helpers.go
@@ -80,9 +80,9 @@ func licenceListHasLicense(license LicenseMatch, licenseList []LicenseMatch) boo
// Apache-2.0 is compatible with GPL-3.0-only
// See https://apache.org/licenses/GPL-compatibility.html
// SPDX-License-Identifier: Apache-2.0
-func bytesToHuman(bytes int) string {
+func bytesToHuman(bytes int64) string {
const TERABYTE = 1099511627776
const GIGABYTE = 1073741824
const MEGABYTE = 1048576
const KILOBYTE = 1024
seems to fix this.
from lc.
Oh neat. That's a good pickup. Ill implement that now.
from lc.
Merged in. Should be all good. Thanks for reporting it.
from lc.
Btw. any reason you use dos line endings? This makes it a bit difficult to work on the source tree with typical go editor setup (e.g. running go fmt on save etc.).
from lc.
None other than I recently moved from a Mac to a Windows machine and am still in the transition period. Ill update my editor to use unix line endings.
from lc.
Final one for this 6222110 added multiple targets to travis to ensure it builds on everything.
from lc.
Related Issues (20)
- panic when running the app
- Use an open license HOT 5
- Add macOS release HOT 5
- Add summary formatter HOT 2
- Performance HOT 8
- Add line seperator
- lc thinks MIT is JSON if there are 2 copyright lines HOT 7
- lc thinks celt license is BSD-2-Clause-NetBSD because of copyright HOT 11
- lc thinks dash license is BSD-4-Clause-UC HOT 1
- --output does not seem to work HOT 1
- lc thinks nnn license is Mup HOT 1
- lc thinks Attic license is Sleepycat HOT 2
- lc skips some SPDX-Identifiers HOT 2
- Add topic: open-source-licensing HOT 2
- Go modules HOT 3
- JSON output is invalid HOT 3
- Apple M1 - preferred version unclear HOT 3
- No release since 2018 HOT 2
- Please support a single file as input HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lc.