marcelja / facebook-delete

Fast facebook activity deletion
MIT License
1.28k stars 48 forks source link

Type *cookiejar.Jar has no field or method Save #49

Closed AlexKalopsia closed 2 years ago

AlexKalopsia commented 2 years ago

When I try and go run deleter.go , the terminal returns req.jar.Save undefined (type *cookiejar.Jar has no field or method Save).

From the docs it looks as if cookiejar doesn't have a Save method, so I am a bit confused.

marcelja commented 2 years ago

It's using persistent-cookiejar which has the Save function: https://github.com/juju/persistent-cookiejar#func-jar-save

What's you go version? Did you run go install before?

AlexKalopsia commented 2 years ago

Ok, found out that this was an issue with VS Code, which was automatically changing "github.com/juju/persistent-cookiejar" to "net/http/cookiejar" whenever I pressed Ctrl+S.

Adding the following to language specific settings.json fixed the issue

"[go]": {

        "editor.formatOnSave": true,
        "editor.codeActionsOnSave": {
            "source.organizeImports": false
        },
    },
    "go.formatTool": "gofmt",

Thanks for the help!