Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Result class #675

Merged
merged 3 commits into from
May 28, 2018
Merged

Add Result class #675

merged 3 commits into from
May 28, 2018

Conversation

eliothedeman
Copy link
Contributor

@eliothedeman eliothedeman commented May 24, 2018

Super basic implementation. Wasn't sure if it made sense to implement as a native go type or not though. #674

@eliothedeman eliothedeman self-assigned this May 24, 2018
@eliothedeman eliothedeman requested review from hachi8833 and st0012 May 24, 2018 16:16
@ghost ghost added the in progress label May 24, 2018
@eliothedeman eliothedeman changed the title Add Option class #674 Add Option class May 24, 2018
@codecov
Copy link

codecov bot commented May 24, 2018

Codecov Report

Merging #675 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #675      +/-   ##
==========================================
+ Coverage   81.86%   81.86%   +<.01%     
==========================================
  Files          57       57              
  Lines        7725     7727       +2     
==========================================
+ Hits         6324     6326       +2     
  Misses       1132     1132              
  Partials      269      269
Impacted Files Coverage Δ
vm/class.go 84.61% <100%> (+0.05%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 53a083b...46dc052. Read the comment docs.

@@ -0,0 +1,18 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
Copy link
Member

Choose a reason for hiding this comment

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

Is it just me or these three line's background are different?

Also, I think we shouldn't put specific code editor's setting in the codebase. Is there any reason for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Missed it. Will ad to the .gitignore

lib/option.gb Outdated
@@ -0,0 +1,29 @@
class Option
def initialize(name=nil, value=nil)
Copy link
Member

Choose a reason for hiding this comment

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

can we make the indentation to 2 spaces?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah sorry!

@@ -1204,8 +1204,10 @@ func builtinClassCommonInstanceMethods() []*BuiltinMethodObject {
loaders, ok := externalClasses[libName]
externalClassLock.Unlock()
if !ok {
return t.vm.InitErrorObject(errors.InternalError, sourceLine, "Can't require \"%s\"", libName)

err := t.execGobyLib(libName + ".gb")
Copy link
Member

Choose a reason for hiding this comment

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

nice 👍

@st0012 st0012 merged commit dd19b03 into goby-lang:master May 28, 2018
@ghost ghost removed the in progress label May 28, 2018
@st0012 st0012 changed the title Add Option class Add Result class May 28, 2018
@SD10
Copy link
Member

SD10 commented May 28, 2018

This is a really nice addition @eliothedeman @st0012 😍

@st0012 st0012 added this to the version 0.1.10 milestone Jun 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants