Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Examples on how to use PsychroLib in all the supported languages are described i
- Python: from the [Python Package Index (PyPI)](https://pypi.org/project/PsychroLib/). [Numba](https://numba.pydata.org/) can be optionally installed to enable array support and faster runtime performance.
- C# (.NET): from the [NuGet package](https://www.nuget.org/packages/PsychroLib/) manager or clone the repository, and bundle according to your requirements.
- C, Fortran and JavaScript: clone the repository, and bundle according to your requirements.
- Go: import from Github - "github.com/psychrometrics/psychrolib/src/go"
- VBA/Excel: download the ready-made spreadsheets from the [release tab](https://github.com/psychrometrics/psychrolib/releases).
- R: from the [Comprehensive R Archive Network (CRAN)](https://cran.r-project.org/package=psychrolib).

Expand Down
20 changes: 20 additions & 0 deletions docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,26 @@ Compile your code and execute the program, the output will be:
TDewPoint: 21.309397 degree C
```

### Go

Create a source file for your program and include the following:

```go
import (
psychrolib "github.com/psychrometrics/psychrolib/src/go"
)

psychrolib.SetUnitSystem(psychrolib.SI)
TDewPoint := psychrolib.GetTDewPointFromRelHum(25.0, 0.80)
fmt.Printf("TDewPoint: %f degree C\n", TDewPoint)
```

Compile your code and execute the program, the output will be:

```
TDewPoint: 21.309397 degree C
```

### Fortran
Create a source file for your program and include the following:

Expand Down
3 changes: 3 additions & 0 deletions src/go/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/psychrometrics/psychrolib/src/go

go 1.22.6
Loading