Skip to content
This repository was archived by the owner on Feb 14, 2025. It is now read-only.

Commit 35592bd

Browse files
authored
cleanup readme (#35)
1 parent ff05c66 commit 35592bd

File tree

3 files changed

+9
-99
lines changed

3 files changed

+9
-99
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# gojo
22

3-
Experiments in porting over Golang stdlib into Mojo and extra goodies that make use of it. This is not intended to be a full port, but rather a learning exercise and a way to experiment with Mojo's capabilities. Please feel free to contribute or use this as a starting point for your own projects! The codebase will remain in flux and will evolve with Mojo as future releases are created.
3+
Experiments in porting over Golang stdlib into Mojo and extra goodies that make use of it. It will not always be a 1:1 port, it's more so code inspired by the Golang stdlib and the Mojo community's code. This is not intended to be a full port, but rather a learning exercise and a way to experiment with Mojo's capabilities. Please feel free to contribute or use this as a starting point for your own projects! The codebase will remain in flux and will evolve with Mojo as future releases are created.
44

55
## Projects that use Gojo
66

@@ -12,7 +12,7 @@ Experiments in porting over Golang stdlib into Mojo and extra goodies that make
1212

1313
### Community projects
1414

15-
- `lightbug_http`: Simple and fast HTTP framework for Mojo! 🔥 [Link to the project.]([https://github.com/thatstoasty/weave](https://github.com/saviorand/lightbug_http/tree/main)
15+
- `lightbug_http`: Simple and fast HTTP framework for Mojo! 🔥 [Link to the project.](https://github.com/saviorand/lightbug_http/tree/main)
1616

1717
## What this includes
1818

gojo/net/net.mojo

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
from collections.optional import Optional
21
from memory._arc import Arc
32
import ..io
4-
from ..builtins import Byte, Error
3+
from ..builtins import Byte
54
from .socket import Socket
65
from .address import Addr, TCPAddr
76

@@ -84,14 +83,14 @@ struct Connection(Conn):
8483
Returns:
8584
The number of bytes read, or an error if one occurred.
8685
"""
87-
var bytes_written: Int
88-
var err: Error
86+
var bytes_written: Int = 0
87+
var err = Error()
8988
bytes_written, err = self.fd[].read(dest)
9089
if err:
9190
if str(err) != io.EOF:
9291
return 0, err
9392

94-
return bytes_written, Error()
93+
return bytes_written, err
9594

9695
fn write(inout self, src: List[Byte]) -> (Int, Error):
9796
"""Writes data to the underlying file descriptor.
@@ -102,13 +101,13 @@ struct Connection(Conn):
102101
Returns:
103102
The number of bytes written, or an error if one occurred.
104103
"""
105-
var bytes_read: Int
106-
var err: Error
104+
var bytes_read: Int = 0
105+
var err = Error()
107106
bytes_read, err = self.fd[].write(src)
108107
if err:
109108
return 0, err
110109

111-
return bytes_read, Error()
110+
return bytes_read, err
112111

113112
fn close(inout self) -> Error:
114113
"""Closes the underlying file descriptor.

test_get_addr.mojo

Lines changed: 0 additions & 89 deletions
This file was deleted.

0 commit comments

Comments
 (0)