Skip to content

Load restricted deployments from file#238

Merged
Theodus merged 1 commit intomainfrom
theodus/mips
Oct 28, 2022
Merged

Load restricted deployments from file#238
Theodus merged 1 commit intomainfrom
theodus/mips

Conversation

@Theodus
Copy link
Member

@Theodus Theodus commented Oct 27, 2022

No description provided.

@Theodus Theodus requested a review from That3Percent October 27, 2022 15:29
@Theodus Theodus marked this pull request as draft October 27, 2022 21:52
@Theodus Theodus removed the request for review from That3Percent October 27, 2022 21:52
@Theodus Theodus changed the title Load restricted deployments from IPFS Load restricted deployments from file Oct 28, 2022
@Theodus Theodus marked this pull request as ready for review October 28, 2022 01:46
@Theodus Theodus requested a review from That3Percent October 28, 2022 01:46
.split('\n')
.filter(|l| l.trim_end() != "")
.map(|line| {
let mut csv = line.split_terminator(',');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a complete csv parser. Probably better to grab a crate next time.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, but the nice thing about CSV is that it's very easy to parse & very flexible. I think this use doesn't warrant another dependency. Though I would probably agree if I expected column headers, equal fields per record, or to support alternative delimiters.

Copy link
Contributor

@That3Percent That3Percent Oct 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or quotes around cells that would make a , char not a delimiter...

@Theodus Theodus merged commit 36ead82 into main Oct 28, 2022
@Theodus Theodus deleted the theodus/mips branch October 28, 2022 15:23
@Theodus Theodus mentioned this pull request Oct 28, 2022
Theodus added a commit that referenced this pull request Oct 28, 2022
# Release Notes
- Load restricted deployments from file (#238)
Theodus added a commit that referenced this pull request Oct 31, 2022
Theodus added a commit that referenced this pull request Oct 31, 2022
# Release Notes
- Load restricted deployments from file (#238)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants