Closed vitaly-zdanevich closed 4 years ago
Closing, because there are no reproduction steps provided. I have no idea what you've done, how to duplicate it, what the differences are between when it (whatever "it" is) works vs when it doesn't. Feel free to open another issue that provides the information that the issue template requests.
For example - try this code:
package main
import (
"fmt"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/dynamodb"
"github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute"
"github.com/aws/aws-sdk-go/service/dynamodb/expression"
)
const (
tableName = "happy-marketer"
)
var (
Sess = session.Must(session.NewSession())
dynamodbClient = dynamodb.New(Sess)
)
func UpdateItemIfSharedEdit(updateItemInput *dynamodb.UpdateItemInput, username string) {
getItemOutput, err := dynamodbClient.GetItem(&dynamodb.GetItemInput{
TableName: updateItemInput.TableName,
Key: updateItemInput.Key,
})
if err != nil {
panic(err)
}
if getItemOutput.Item["shrd"] == nil ||
(getItemOutput.Item["shrd"] != nill && getItemOutput.Item["shrd"].M[username] == nil) ||
(getItemOutput.Item["shrd"] != nil && *getItemOutput.Item["shrd"].M[username].S == "view") {
fmt.Println("HACKING attempt")
return
}
_, err = dynamodbClient.UpdateItem(updateItemInput)
if err != nil {
panic(err)
}
}
@vitaly-zdanevich please see my previous comment.
Help me help you by opening a new issue that describes how to replicate the problem, a clear description of the expected result, and a clear description of the actual result in addition to the information that you provided about your environment. Imagine you're me and you're trying to understand how to duplicate the issue you've described...
For users with this problem - I found why for me: my inotify file watch limit was exhausted. You can check your limit with
cat /proc/sys/fs/inotify/max_user_watches
You can increase limit temporary, for check:
sysctl fs.inotify.max_user_watches=524288
sysctl -p
If you like to make your limit permanent, use:
echo fs.inotify.max_user_watches=524288 | tee -a /etc/sysctl.conf
sysctl -p
Information from https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers#the-technical-details
@bhcleek if you want you can try to reproduce this by decreasing inotify file watch limit, maybe in such case would be useful to show some message to user, or somehow to optimize the code against a lot of file watchers (I have this problem when only one file is opened, and when in directory I have only this one file).
No, problem with something else. Sometimes errors are highlighted, sometimes not.
vim-go version:
13af5df6a1b3bc4bdfd03e3c05fa600d1dd16de6
vimrc
you used to reproduce:I read my vimrc just now - and I do not see anything special about this problem. I have installed ALE - I tried to move it out from ~/.vim/pack/**/start.
My full vimrs - I do not know what I can cut
Vim version (first three lines from
:version
):VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Apr 3 2020 21:00:49) Included patches: 1-360 Modified by Gentoo-8.2.0360
Go version (
go version
):go version go1.13.10 linux/386
Go environment
go env
Output:gopls version
gopls version
Output:vim-go configuration:
vim-go configuration
filetype detection configuration:
filetype detection