Skip to content

Commit

Permalink
bugfix: took away documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jjfantini committed Sep 24, 2023
1 parent 231e2ed commit 2121027
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 16 deletions.
2 changes: 2 additions & 0 deletions src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ This is a template for creating a new Mojo package.
## Mojo Usage

[Module and Package Docs](https://docs.modular.com/mojo/manual/get-started/packages.html)


2 changes: 1 addition & 1 deletion src/main.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ from mypackage import MyPair

fn main():
let mine = MyPair(2, 4)
mine.dump()
mine.dump()
15 changes: 0 additions & 15 deletions src/mypackage/mymodule/mymodule.mojo
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
"""
Notice that this code has no main() function, so you can’t execute mymodule.mojo. However, you can import this into another file with a main() function and use it there.
For example, here’s how you can import MyPair into a file named main.mojo that’s in the same directory as mymodule.mojo:
main.mojo
from mymodule import MyPair
fn main():
let mine = MyPair(2, 4)
mine.dump()
Alternatively, you can import the whole module and then access its members through the module name. For example:
"""

struct MyPair:
var first: Int
var second: Int
Expand Down

0 comments on commit 2121027

Please sign in to comment.