Giter Club home page Giter Club logo

Comments (6)

rusq avatar rusq commented on May 30, 2024 2

That's a good one, thanks for raising it. Seems no one tried to use this as a library since the beginning.

Could you try adding this line to the end of your go.mod file please?

replace github.com/slack-go/slack => github.com/rusq/slack v0.10.4

The OptionCookieRAW is a modification I made to the original slack library (the one which is used in this project is github.com/rusq/slack).

I may need to add this to the doc.

from slackdump.

rusq avatar rusq commented on May 30, 2024

from slackdump.

shotesmagotes avatar shotesmagotes commented on May 30, 2024

Hmm even after go get my example won't build.

package main

import (
	"github.com/joho/godotenv"
	"github.com/rusq/slackdump/v2"
	"github.com/rusq/slackdump/v2/auth"
)

func loadEnv() {
	err := godotenv.Load()
	if err != nil {
		log.Fatal("Error loading .env file")
	}
}

func main() {
	if os.GetEnv("MACHINE") == "local" {
		loadEnv()
	}

	token := os.GetEnv("TOKEN")
	cookie := os.GetEnv("COOKIE")
	provider, err := auth.NewValueAuth(token, cookie)
	if err != nil {
		log.Print(err)
		return
	}

	sd, err := v2.New(context.Background(), provider)
	if err != nil {
		log.Print(err)
		return
	}
	_ = sd
}

go.mod:

module github.com/shotesmagotes/slacktradealerts

go 1.18
require (
	github.com/joho/godotenv v1.4.0
	github.com/rusq/slackdump/v2 v2.0.0
)

require (
	github.com/MercuryEngineering/CookieMonster v0.0.0-20180304172713-1584578b3403 // indirect
	github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 // indirect
	github.com/fatih/color v1.13.0 // indirect
	github.com/go-stack/stack v1.8.1 // indirect
	github.com/gorilla/websocket v1.5.0 // indirect
	github.com/mattn/go-colorable v0.1.9 // indirect
	github.com/mattn/go-isatty v0.0.14 // indirect
	github.com/pkg/errors v0.9.1 // indirect
	github.com/playwright-community/playwright-go v0.2000.1 // indirect
	github.com/rusq/dlog v1.3.3 // indirect
	github.com/slack-go/slack v0.10.2 // indirect
	golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27 // indirect
	golang.org/x/time v0.0.0-20220224211638-0e9765cccd65 // indirect
	gopkg.in/square/go-jose.v2 v2.6.0 // indirect
)

and gives the same error:

# github.com/rusq/slackdump/v2
../../../../pkg/mod/github.com/rusq/slackdump/[email protected]/slackdump.go:95:51: undefined: slack.OptionCookieRAW

from slackdump.

shotamakino avatar shotamakino commented on May 30, 2024

I actually don't see OptionCookieRAW in slack-go/slack code. I'm wondering how the builds are completing on GitHub actions

from slackdump.

shotesmagotes avatar shotesmagotes commented on May 30, 2024

thanks!

from slackdump.

rusq avatar rusq commented on May 30, 2024

Documented the usage in #84, thanks for your help @shotesmagotes

from slackdump.

Related Issues (20)

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.