Skip to content

Commit

Permalink
use default_env! like in openbook
Browse files Browse the repository at this point in the history
  • Loading branch information
mschneider committed Dec 14, 2022
1 parent 02218ea commit a639809
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ You can use the `env!` macro to automatically configure values passed to the `se
### Example

```rust
#[cfg(not(feature = "no-entrypoint"))]
use {default_env::default_env, solana_security_txt::security_txt};

#[cfg(not(feature = "no-entrypoint"))]
security_txt! {
// Required fields
Expand All @@ -79,8 +82,8 @@ security_txt! {
// Optional Fields
preferred_languages: "en,de",
source_code: "https://github.com/example/example",
source_revision: env!("GITHUB_SHA"),
source_release: env!("GITHUB_REF_NAME"),
source_revision: default_env!("GITHUB_SHA", ""),
source_release: default_env!("GITHUB_REF_NAME", ""),
encryption: "
-----BEGIN PGP PUBLIC KEY BLOCK-----
Comment: Alice's OpenPGP certificate
Expand Down

0 comments on commit a639809

Please sign in to comment.