Skip to content

Instantly share code, notes, and snippets.

View collinvandyck's full-sized avatar
🏠
Working from home

Collin Van Dyck collinvandyck

🏠
Working from home
View GitHub Profile
package encryption
import (
"bytes"
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"crypto/rsa"
"fmt"
"testing"

Since the latest update (2018.3) i've run into a number of issues:

Support for import aliases

I am importing some go packages that have different package names from what their import url would suggest. Previously it was able to deal with this. Now, Goland will sometimes delete a whole bunch of imports. I found after some trial and error that this mostly happened with these kinds of imports. I'm able to "fix" it by defining an alias for that import and then using the alias.

Commit dialog issues with File Watchers

When I try to commit code through the editor, I will frequently get an error dialog saying that the commit failed because something else (the file watcher) is writing to disk. I have to cancel the commit, let it save, and then recommit. My work around for this is to just do my commits in a separate terminal application.

type waitGroup struct {
sync.WaitGroup
}
func (wg *waitGroup) DoneChan() chan struct{} {
ch := make(chan struct{})
go func() {
defer close(ch)
wg.Wait()
}()
package main
import (
"math/rand"
"testing"
)
type mapType map[int64]struct{}
type sliceType []int64

Keybase proof

I hereby claim:

  • I am collinvandyck on github.
  • I am keys_so_fresh (https://keybase.io/keys_so_fresh) on keybase.
  • I have a public key whose fingerprint is B15B 99AA FB14 467B BA53 050F 00D5 B8EF 8827 C137

To claim this, I am signing this object:

import com.librato.alerts.IEmitter;
public class DoubleDispatch {
static IEmitter emitter;
public static void main(String[] args) {
IMessage messageA = new MessageA();
IMessage messageB = new MessageB();
// without double dispatch
package models
type concurrent struct {
fns []func() (interface{}, error)
}
func (this *concurrent) addFn(fn func() (interface{}, error)) *concurrent {
this.fns = append(this.fns, fn)
return this
}
80808 Alloc - 41469 Frees - 193 HeapObjects - 0 HeapReleased - 221184 HeapInuse
80808 Alloc - 41740 Frees - 193 HeapObjects - 0 HeapReleased - 237568 HeapInuse
80808 Alloc - 42023 Frees - 193 HeapObjects - 0 HeapReleased - 237568 HeapInuse
80872 Alloc - 42306 Frees - 194 HeapObjects - 0 HeapReleased - 221184 HeapInuse
80872 Alloc - 42589 Frees - 194 HeapObjects - 0 HeapReleased - 237568 HeapInuse
80872 Alloc - 42872 Frees - 194 HeapObjects - 0 HeapReleased - 221184 HeapInuse
80872 Alloc - 43155 Frees - 194 HeapObjects - 0 HeapReleased - 221184 HeapInuse
80936 Alloc - 43438 Frees - 195 HeapObjects - 0 HeapReleased - 237568 HeapInuse
80872 Alloc - 43719 Frees - 194 HeapObjects - 0 HeapReleased - 237568 HeapInuse
80936 Alloc - 44001 Frees - 195 HeapObjects - 0 HeapReleased - 237568 HeapInuse
package main
import (
"fmt"
"runtime"
"time"
)
func main() {
go func() {
package main
import (
"fmt"
"time"
"runtime"
)
func loopit() {
for {