os: change example to avoid deprecated function
os: change example to avoid deprecated function

The IsNotExist function is deprecated; change package example to avoid
it and use the recommended way instead.

Fixes #46976

Change-Id: I3c301d0a89b6bda42184df314ba8418062ca39ee
Reviewed-on: https://go-review.googlesource.com/c/go/+/331692
Trust: Dmitri Shuralyov <d181b7fea0ec87c86ba5a890ab716db52498e3ba@golang.org>
Reviewed-by: Ian Lance Taylor <87e9c6d529889242b7e184afb632328636553ab4@golang.org>
Reviewed-by: Robert Griesemer <a6752097faebf1f02d80107d77a9be009089afe3@golang.org>

nawawi/go,cloudflare/go,CAFxX/go,cloudflare/go,cloudflare/go,CAFxX/go,CAFxX/go,golang/go,golang/go,nawawi/go,CAFxX/go,golang/go,nawawi/go,CAFxX/go,golang/go,nawawi/go,nawawi/go,cloudflare/go,golang/go,golang/go,nawawi/go,CAFxX/go,cloudflare/go,nawawi/go,golang/go,cloudflare/go,golang/go,nawawi/go,CAFxX/go,cloudflare/go,cloudflare/go,CAFxX/go