kept it short because i did not want to push the leg too much. felt good to get out even though i could have slept in.
#running
#running
#running
#running
⨁ Follow button on their profile page or use the Follow form and enter a Twtxt URL. You may also find other feeds of interest via Feeds. Welcome! 🤗
⨁ Follow button on their profile page or use the Follow form and enter a Twtxt URL. You may also find other feeds of interest via Feeds. Welcome! 🤗
⨁ Follow button on their profile page or use the Follow form and enter a Twtxt URL. You may also find other feeds of interest via Feeds. Welcome! 🤗
⨁ Follow button on their profile page or use the Follow form and enter a Twtxt URL. You may also find other feeds of interest via Feeds. Welcome! 🤗
And there are alternatives for those who needs\\wants activitypub, so I think also yarn\\twtxt benefits from you focusing on that instead of dealing with the frustrations of activitypub integration. And maybe it'll feel a bit better to put that on the backburner? :)
And there are alternatives for those who needs\wants activitypub, so I think also yarn\twtxt benefits from you focusing on that instead of dealing with the frustrations of activitypub integration. And maybe it'll feel a bit better to put that on the backburner? :)
⨁ Follow button on their profile page or use the Follow form and enter a Twtxt URL. You may also find other feeds of interest via Feeds. Welcome! 🤗
⨁ Follow button on their profile page or use the Follow form and enter a Twtxt URL. You may also find other feeds of interest via Feeds. Welcome! 🤗
http://github.com/brandur/tmux-extra
Works great with powerline.
http://github.com/brandur/tmux-extra
Works great with powerline.
tmux a would just create a new session if there's no session already to attach to. I probably do that once a day.
Is to Because
Is to Because
type ErrPermissionNotAllowed []Permission
func (perms ErrPermissionNotAllowed) Is(permission Permission) bool {
for _, p := range perms {
if p == permission { return true }
}
return false
}
var err error = errPermissionNotAllowed{"is-noob"}
if errors.Is(err, ErrPermissionNotAllowed{}) { ... } // user is not allowed
var e ErrPermissionNotAllowed
if errors.As(err, e) && e.Is("a-noob") { ... } // user is not allowed because they are a noob.
type ErrPermissionNotAllowed []Permission
func (perms ErrPermissionNotAllowed) Is(permission Permission) bool {
for _, p := range perms {
if p == permission { return true }
}
return false
}
var err error = errPermissionNotAllowed{"is-noob"}
if errors.Is(err, ErrPermissionNotAllowed{}) { ... } // user is not allowed
var e ErrPermissionNotAllowed
if errors.As(err, e) && e.Is("a-noob") { ... } // user is not allowed because they are a noob.
⨁ Follow button on their profile page or use the Follow form and enter a Twtxt URL. You may also find other feeds of interest via Feeds. Welcome! 🤗
⨁ Follow button on their profile page or use the Follow form and enter a Twtxt URL. You may also find other feeds of interest via Feeds. Welcome! 🤗
As is perfect for your array type because it asserts the matching type out the wrap stack and populates the type for evaluating its contents.
As is perfect for your array type because it asserts the matching type out the wrap stack and populates the type for evaluating its contents.
Not the moon
But other than that, vertical mice are much more comfortable …
But other than that, vertical mice are much more comfortable …
But other than that, vertical mice are much more comfortable …
Vertical mouse
Is check for array equality, too? At least that would be great for unit tests. Like this untested piece of code:func (e PermissionsNotAllowedError) Is(target error) bool {
if t, ok := target.(PermissionsNotAllowedError); ok && len(e) len(t) {
for i := range e {
if e[i] != t[i] {
return false
}
}
return true
}
return false
}
In the meantime I just ditched the second thing altogether and use the simple
ErrPermissionNotAllowed. Maybe I come back when I actually work on the UI stuff.Now writing this it occurs to me that I could do an explicit – second – unit test assertion for array equality and implement my
Is and As functions with a type check only and don't care about the exact array. Like that (again, untested):func (e PermissionsNotAllowedError) Is(target error) bool {
_, ok := target.(PermissionsNotAllowedError)
return ok
}
Yeah, that's probably the way to do it._