#running
#running
I started with a simple
var ErrPermissionNotAllowed = errors.New("permission not allowed"). In my function I then wrap that using fmt.Errorf("%w: %v", ErrPermissionNotAllowed, failedPermissions). I can match this error using errors.Is(err, ErrPermissionNotAllowed). So far so good.Now for display purposes I'd also like to access the individual permissions that could not be assigned. Parsing the error message is obviously not an option. So I thought, I create a custom error type, e.g.
type PermissionNotAllowedError []Permission and give it some func (e PermissionNotAllowedError) Error() string { return fmt.Sprintf("permission not allowed: %v", e) }. My function would then return this error instead: PermissionNotAllowedError{failedPermissions}At some layers I don't care about the exact permissions that failed, but at others I do, at least when accessing them. A custom
func (e PermissionNotAllowedError) Is(target err) bool could match both the general ErrPermissionNotAllowed as well as the PermissionNotAllowedError. Same with As(…). For testing purposes the PermissionNotAllowedError would then also try to match the included permissions, so assertions in tests would work nicely. But having two different errors for different matching seems not very elegant at all.Did you ever encounter this scenario before? How did you address this? Is my thinking flawed?
⨁ 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! 🤗
Gato 1 - Humano 0 ⌘ Read more****
Nota para mis nuevos seguidores: Sois bienvenidos pero si os acercáis a mi comida... ⌘ Read more****
_ Google can basically do whatever they want
- You as a website owner have no legal recourse_
_ Google can basically do whatever they want
- You as a website owner have no legal recourse_
_ Google can basically do whatever they want
- You as a website owner have no legal recourse_
nofollow,noindex instruction? 🤔
nofollow,noindex instruction? 🤔
nofollow,noindex instruction? 🤔
robots.txt, right?
User-agent: Googlebot
Disallow: /
robots.txt, right?
User-agent: Googlebot
Disallow: /
robots.txt, right?
User-agent: Googlebot
Disallow: /
¡No pongáis IA en los electrodomésticos! ⌘ Read more****
<meta name=”googlebot” content=”noindex,nofollow”>
to everything I guess.
> Google updated its privacy policy over the weekend, explicitly saying the company reserves the right to scrape just about everything you post online to build its AI tools.
Google can eat shit.
⨁ 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! 🤗
#running
#running
#running
had a blast. just went by feel pretty much. realized i may be going a bit too fast that first mile so tried to slow it down the next two and keep it at what i thought was between 8:15 to 8:30 pace. the official time was 32:36 i believe.
time to hydrate and then get ready for the amusement parks and kids.
#running #race
Bom dia
Estrategias de verano. ⌘ Read more****
#running
#running
#running
actually i went the wrong direction and then got lost so had to make up some time with a slow jog to "warm up".
#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! 🤗