Code Monkey home page Code Monkey logo

cli's People

Contributors

binarylogic avatar jszwedko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cli's Issues

Alternative input methods for `timber sql-queries execute`

I'm taking sql-queries execute for a spin to figure out if we can extract more aggregate data from our logs, like all the user_ids that are present on a specific error, and I'm noticing that interacting with the program and writing more complex queries could be made easier by supporting things like passing the query through stdin (cat timber.sql | timber sql-queries execute) or through a --file switch

`api` action panics

timber api

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x12ce6c5]

goroutine 1 [running]:
github.com/timberio/cli/api.(*Client).Request(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x13abaa0, 0xc0000a0ca0, ...)
	/go/src/github.com/timberio/cli/api/client.go:283 +0x45
main.request(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc0000d16a8, 0x133bbef)
	/go/src/github.com/timberio/cli/request.go:11 +0xdd
main.main.func13(0xc0000ee9a0, 0x0, 0xc0000ee9a0)
	/go/src/github.com/timberio/cli/main.go:535 +0xa0
github.com/timberio/cli/vendor/gopkg.in/urfave/cli%2ev1.HandleAction(0x1393760, 0x1426478, 0xc0000ee9a0, 0xc00009e500, 0x0)
	/go/src/github.com/timberio/cli/vendor/gopkg.in/urfave/cli.v1/app.go:490 +0xc8
github.com/timberio/cli/vendor/gopkg.in/urfave/cli%2ev1.Command.Run(0x140d7d7, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1420d93, 0x4a, 0x0, ...)
	/go/src/github.com/timberio/cli/vendor/gopkg.in/urfave/cli.v1/command.go:210 +0x92f
github.com/timberio/cli/vendor/gopkg.in/urfave/cli%2ev1.(*App).Run(0xc0000ba680, 0xc0000a0000, 0x2, 0x2, 0x0, 0x0)
	/go/src/github.com/timberio/cli/vendor/gopkg.in/urfave/cli.v1/app.go:255 +0x69b
main.main()
	/go/src/github.com/timberio/cli/main.go:578 +0x12c2

ineffectual assignment to error

The returned error values are overwritten before being handled.
This is problematic as he return values are used in other places for assignments eg organization.ID.

auth.go:36:16


        organization, err := getCurrentOrganization(client)

	// Load the current credentials
	credentials, err := loadCredentials()
	if err != nil {
		return nil, err
	}

auth.go:195:13

        timberDir, err := getTimberDirPath()
	err = os.MkdirAll(timberDir, os.ModePerm)
	if err != nil {
		return err
	}

	// Ensure that the credentials file exists
	credentialsPath := path.Join(timberDir, credentialsFileName)
	f, err := os.Create(credentialsPath)

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.