This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func (w *Worker) listen(ctx context.Context, length int) { | |
| fmt.Printf("Listening on subscription ID: %s\n\n", w.pubsub.SubscriptionID) | |
| sub := &Subscription{ | |
| Data: make(chan []byte), | |
| Done: make(chan struct{}), | |
| } | |
| // The counter of how many received messages. | |
| received := 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ================== | |
| WARNING: DATA RACE | |
| Write at 0x00c0003ee798 by goroutine 54: | |
| strings.(*Reader).Seek() | |
| /usr/local/go/src/strings/reader.go:117 +0x44 | |
| github.com/verbiscms/verbis/api/services/storage.(*Storage).upload() | |
| /Users/ainsley/Desktop/Reddico/verbis/verbis/api/services/storage/bucket.go:163 +0x1b4 | |
| github.com/verbiscms/verbis/api/services/storage.(*Storage).Upload() | |
| /Users/ainsley/Desktop/Reddico/verbis/verbis/api/services/storage/bucket.go:98 +0x578 | |
| github.com/verbiscms/verbis/api/services/storage.(*StorageTestSuite).TestBucket_Upload.func7() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "github.com/radovskyb/watcher" | |
| "log" | |
| "time" | |
| ) | |
| func main() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Copyright 2020 The Verbis Authors. All rights reserved. | |
| // Use of this source code is governed by a BSD-style | |
| // license that can be found in the LICENSE file. | |
| package watchers | |
| import ( | |
| "github.com/ainsleyclark/verbis/api/errors" | |
| "github.com/ainsleyclark/verbis/api/helpers/mime" | |
| "github.com/ainsleyclark/verbis/api/logger" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| goroutine 26468 [running]: | |
| runtime.throw(0x1b80aab, 0x15) | |
| /Users/ainsley/go/go1.16/src/runtime/panic.go:1117 +0x72 fp=0xc00098d2a0 sp=0xc00098d270 pc=0x1039852 | |
| runtime.mapassign(0x1a4f8a0, 0xc0003a4660, 0xc000cf0440, 0xc000cf0440) | |
| /Users/ainsley/go/go1.16/src/runtime/map.go:585 +0x5aa fp=0xc00098d320 sp=0xc00098d2a0 pc=0x101190a | |
| reflect.mapassign(0x1a4f8a0, 0xc0003a4660, 0xc000cf0440, 0xc000cf0420) | |
| /Users/ainsley/go/go1.16/src/runtime/map.go:1328 +0x3f fp=0xc00098d350 sp=0xc00098d320 pc=0x106cf3f | |
| reflect.Value.SetMapIndex(0x1a4f8a0, 0xc000198450, 0x195, 0x1a0aba0, 0xc000cf0440, 0x98, 0x1a38dc0, 0xc000cf0420, 0x194) | |
| /Users/ainsley/go/go1.16/src/reflect/value.go:1710 +0x27c fp=0xc00098d3d0 sp=0xc00098d350 pc=0x10ac61c | |
| encoding/json.(*decodeState).object(0xc0009364d0, 0x1a4f8a0, 0xc000198450, 0x195, 0xc0009364f8, 0x7b) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "category":[ | |
| { | |
| "id": 1, | |
| "type":"category" | |
| } | |
| ], | |
| "image":{ | |
| "id": 1, | |
| "type": "image" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- ===================== | |
| Header | |
| ===================== --> | |
| {{ $colour := getField "header_colour" }} | |
| <header class="header {{ if eq $colour "Green" }} header-green {{ end }} {{ if eq $colour "Transparent Black" }} header-black {{ end }}"> | |
| <!-- Left --> | |
| <div class="header-left"> | |
| <!-- Logo --> | |
| <a class="header-logo" href="/"> | |
| {{ partial "partials/icons/logo.cms" }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .header { | |
| position: fixed; | |
| display: flex; | |
| align-items: center; | |
| justify-content: space-between; | |
| top: 0; | |
| left: 0; | |
| height: 70px; | |
| width: 100vw; | |
| padding: 0 5vw; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| WARNING: DATA RACE | |
| Write at 0x00c0005f60a8 by goroutine 37: | |
| github.com/ainsleyclark/verbis/api/models.(*MediaStore).getOptionsStruct() | |
| /Users/ainsley/Desktop/Reddico/apis/verbis/api/models/media.go:77 +0xe5 | |
| github.com/ainsleyclark/verbis/api/models.(*MediaStore).Serve() | |
| /Users/ainsley/Desktop/Reddico/apis/verbis/api/models/media.go:170 +0x55 | |
| github.com/ainsleyclark/verbis/api/http/controllers.(*FrontendController).GetUploads() | |
| /Users/ainsley/Desktop/Reddico/apis/verbis/api/http/controllers/frontend.go:106 +0x288 | |
| github.com/ainsleyclark/verbis/api/http/controllers.FrontendHandler.GetUploads-fm() | |
| /Users/ainsley/Desktop/Reddico/apis/verbis/api/http/controllers/frontend.go:29 +0x50 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // TestMediaController_Upload - Test Upload route | |
| func TestMediaController_Upload(t *testing.T) { | |
| //rr := newTestSuite(t) | |
| path := "/Users/ainsley/Desktop/Reddico/apis/verbis/api/test/testdata/images/gopher.svg" | |
| body := new(bytes.Buffer) | |
| w := multipart.NewWriter(body) | |
| part, err := w.CreateFormFile("file", filepath.Base(path)) |