Code Monkey home page Code Monkey logo

missinggo's Introduction

missinggo

GoDoc

Stuff that supplements Go's stdlib, or isn't significant enough to be in its own repo.

missinggo's People

Contributors

anacrolix avatar dependabot[bot] avatar ftk avatar jbenet avatar michaeldye avatar ober avatar oiooj avatar stumoss avatar ucwong avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

missinggo's Issues

undefined reflect.StructOf

This project has used reflect.StructOf. But when I compiler the project, it prints that reflect.StructOf is not defined. I have searched the Internet and find there is no this struct. Do you meet this problem?

missinggo/httptoo broken

github.com/anacrolix/missinggo/httptoo

../../anacrolix/missinggo/httptoo/inproc_roundtrip.go:23: cannot use responseWriter literal (type *responseWriter) as type interface { CloseNotify() <-chan bool; Header() http.Header; Write([]byte) (int, error); WriteHeader(int) } in assignment:
*responseWriter does not implement interface { CloseNotify() <-chan bool; Header() http.Header; Write([]byte) (int, error); WriteHeader(int) } (missing CloseNotify method)

conntrack: double lock on EntryHandle

After investigating an issue with an always increasing number of goroutines locked in the same Wait() function I ended up on the following double-lock on eh.added:

eh.added.Lock()
i.addWaiter(eh)
i.mu.Unlock()
expvars.Add("waits that blocked", 1)
eh.added.Lock()

I don't know if this is expected but I find it quite dubious.

Build fails on FreeBSD

Build fails on freebsd:

/home/mro$ go get github.com/anacrolix/utp    
# github.com/spacemonkeygo/monotime/_cgo
cc: warning: argument unused during compilation: '-pthread'
# github.com/anacrolix/missinggo
src/github.com/anacrolix/missinggo/atime.go:10: undefined: fileInfoAccessTime

Copying src/github.com/anacrolix/missinggo/atime_darwin.go to src/github.com/anacrolix/missinggo/atime_freebsd.go fixes the issue.

go get error

when I go get -v github.com/anacrolix/missinggo,error happen:

github.com/anacrolix/missinggo
# github.com/anacrolix/missinggo
../../go/src/github.com/anacrolix/missinggo/section_read_seeker.go:25: cannot use sectionReadSeeker literal (type *sectionReadSeeker) as type ReadSeekContexter in assignment:
        *sectionReadSeeker does not implement ReadSeekContexter (wrong type for ReadContext method)
                have ReadContext("context".Context, []byte) (int, error)
                want ReadContext("golang.org/x/net/context".Context, []byte) (int, error)

if forgot to fix reader_context.go file import context package?

License?

What is the license of this code? I recommend adding BSD or MIT.

Rename goleaktest.go to goleak_test.go

Using this package during a flag.parse() would result in testing values being listed as well when --help is run.

Env:
Go 1.8.3

OS:
Sierra (Darwin Kernel Version 16.4.0)

-test.bench regexp
        run only benchmarks matching regexp
  -test.benchmem
        print memory allocations for benchmarks
  -test.benchtime d
        run each benchmark for duration d (default 1s)
  -test.blockprofile file
        write a goroutine blocking profile to file
  -test.blockprofilerate rate
        set blocking profile rate (see runtime.SetBlockProfileRate) (default 1)
  -test.count n
        run tests and benchmarks n times (default 1)
  -test.coverprofile file
        write a coverage profile to file
  -test.cpu list
        comma-separated list of cpu counts to run each test with
  -test.cpuprofile file
        write a cpu profile to file
  -test.memprofile file
        write a memory profile to file
  -test.memprofilerate rate
        set memory profiling rate (see runtime.MemProfileRate)
  -test.mutexprofile string
        write a mutex contention profile to the named file after execution
  -test.mutexprofilefraction int
        if >= 0, calls runtime.SetMutexProfileFraction() (default 1)
  -test.outputdir dir
        write profiles to dir
  -test.parallel n
        run at most n tests in parallel (default 8)
  -test.run regexp
        run only tests and examples matching regexp
  -test.short
        run smaller test suite to save time
  -test.timeout d
        fail test binary execution after duration d (0 means unlimited)
  -test.trace file
        write an execution trace to file
  -test.v
        verbose: print additional output

remove bradfitz.iter.N from iter.n

github.com/bradfitz/iter is a one line piece of code created for education and not intended for use as a package by real code. Treating it as a real package puts unnecessary strain on packaging infrastructure.

Please replace the reference to iter.N in missinggo/iter/n.go to provide the actual slice that is needed:

package iter

func N(n int) []struct{} {
        return make([]struct{}, n)
}

Bits in missing/v2 depend on missingo/v1

Having multi-version internal dependencies, along spoiling the style, breaks vendoring.

The library should be made consistent on which version of sub-packages they depend on.

Int overflow on 32 bits arches

Golang 1.12.6 on i686 and armv7

Testing    in: /builddir/build/BUILD/missinggo-2.1.0/_build/src
         PATH: /builddir/build/BUILD/missinggo-2.1.0/_build/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin
       GOPATH: /builddir/build/BUILD/missinggo-2.1.0/_build:/usr/share/gocode
  GO111MODULE: off
      command: go test -buildmode pie -compiler gc -ldflags "-X github.com/anacrolix/missinggo/version=2.1.0 -extldflags '-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '"
      testing: github.com/anacrolix/missinggo
github.com/anacrolix/missinggo
PASS
ok  	github.com/anacrolix/missinggo	0.007s
github.com/anacrolix/missinggo/bitmap
FAIL	github.com/anacrolix/missinggo/bitmap [build failed]
BUILDSTDERR: # github.com/anacrolix/missinggo/bitmap [github.com/anacrolix/missinggo/bitmap.test]
BUILDSTDERR: ./bitmap_test.go:91:34: constant 9223372036854775807 overflows int

missinggo modules confusion

I'm getting this with missinggo as an indirect dependency of lantern's http-proxy -- seems not to like this line in go.mod:

module github.com/anacrolix/missinggo/v2 
$ GO111MODULE=on go get github.com/anacrolix/missinggo@master
go: finding github.com/anacrolix/missinggo master
go: github.com/anacrolix/[email protected]: go.mod has post-v0 module path "github.com/anacrolix/missinggo/v2" at revision 3d85a149c812
go: error loading module requirements

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.