-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e8ac09b
commit bde99a0
Showing
1 changed file
with
3 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -232,12 +232,10 @@ pub struct PurlParts { | |
/// use phylum_purl::{PackageType, Purl}; | ||
/// | ||
/// // Use the builder if you want to set fields besides the type and name. | ||
/// let purl = Purl::builder(PackageType::Npm, "@my-company/my-package") | ||
/// .with_version(Some("1.2.3")) | ||
/// .build() | ||
/// .unwrap(); | ||
/// let purl = | ||
/// Purl::builder(PackageType::Npm, "my-package").with_version(Some("1.2.3")).build().unwrap(); | ||
/// | ||
/// assert_eq!("pkg:npm/%40my-company%2Fmy[email protected]", &purl.to_string()); | ||
/// assert_eq!("pkg:npm/my[email protected]", &purl.to_string()); | ||
/// ``` | ||
/// | ||
/// # See also | ||
|
bde99a0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was the
@my-company
scope not valid?bde99a0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should have been a namespace. It's easier to just not have it in this example.
bde99a0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah, I see that now. 👍