* Prohibit variable shadowing

* Fix outstanding shadowed variables
Этот коммит содержится в:
Hanzei
2019-01-31 12:16:16 +01:00
коммит произвёл Jesús Espino
родитель cd30a1f242
Коммит 0c981aa010
3 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@@ -290,7 +290,7 @@ clean-docker: ## Deletes the docker containers for local development.
govet: ## Runs govet against all packages.
@echo Running GOVET
$(GO) vet $(GOFLAGS) $(TE_PACKAGES) || exit 1
$(GO) vet -shadow $(GOFLAGS) $(TE_PACKAGES) || exit 1
ifeq ($(BUILD_ENTERPRISE_READY),true)
$(GO) vet $(GOFLAGS) $(EE_PACKAGES) || exit 1

Просмотреть файл

@@ -750,9 +750,9 @@ func TestPinPost(t *testing.T) {
channel, err := th.App.GetChannelByName("town-square", th.BasicTeam.Id, true)
assert.Nil(t, err)
post := th.CreatePostWithClient(th.SystemAdminClient, channel)
adminPost := th.CreatePostWithClient(th.SystemAdminClient, channel)
_, resp := Client.PinPost(post.Id)
_, resp = Client.PinPost(adminPost.Id)
CheckForbiddenStatus(t, resp)
})

Просмотреть файл

@@ -330,7 +330,7 @@ func (a *App) getLinkMetadata(requestURL string, timestamp int64, isNewPost bool
// Check the database if this isn't a new post. If it is a new post and the data is cached, it should be in memory.
if !isNewPost {
og, image, ok := a.getLinkMetadataFromDatabase(requestURL, timestamp)
og, image, ok = a.getLinkMetadataFromDatabase(requestURL, timestamp)
if ok {
cacheLinkMetadata(requestURL, timestamp, og, image)