Skip to content

Commit

Permalink
feat: Adiciona biblioteca sistema
Browse files Browse the repository at this point in the history
  • Loading branch information
natanfeitosa committed Jan 3, 2024
1 parent 5043f7f commit a5cac7b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
27 changes: 27 additions & 0 deletions stdlib/sistema/sistema.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package sistema

import (
"runtime"

"github.com/natanfeitosa/portuscript/ptst"
)

func init() {
constantes := ptst.Mapa{
"ARQUITETURA": ptst.Texto(runtime.GOARCH),
"NOME": ptst.Texto(runtime.GOOS),
}

metodos := []*ptst.Metodo{}

ptst.RegistraModuloImpl(
&ptst.ModuloImpl{
Info: ptst.ModuloInfo{
Nome: "sistema",
CaminhoModulo: "stdlib/sistema",
},
Constantes: constantes,
Metodos: metodos,
},
)
}
1 change: 1 addition & 0 deletions stdlib/stdlib.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ package stdlib
import (
_ "github.com/natanfeitosa/portuscript/stdlib/embutidos"
_ "github.com/natanfeitosa/portuscript/stdlib/matematica"
_ "github.com/natanfeitosa/portuscript/stdlib/sistema"
)

0 comments on commit a5cac7b

Please sign in to comment.