Add example for UnveilBlock in readme

This commit is contained in:
Andinus 2020-04-15 00:26:43 +05:30
parent a129334aef
commit 46e839f189
Signed by: andinus
GPG Key ID: B67D55D482A799FD
1 changed files with 17 additions and 0 deletions

View File

@ -63,3 +63,20 @@ func main() {
}
}
#+END_SRC
** UnveilBlock
UnveilBlock is just a wrapper around unix.UnveilBlock, it does nothing extra.
You should use unix.UnveilBlock.
#+BEGIN_SRC go
package main
import "tildegit.org/andinus/lynx"
func main() {
// Block further unveil calls.
err = lynx.UnveilBlock()
if err != nil {
log.Fatal(err)
}
}
#+END_SRC