-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from phated/main
- Loading branch information
Showing
10 changed files
with
374 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ jobs: | |
- uses: engineerd/[email protected] | ||
with: | ||
name: "grain" | ||
url: "https://github.com/grain-lang/grain/releases/download/grain-v0.3.2/grain-linux-x64" | ||
url: "https://github.com/grain-lang/grain/releases/download/grain-v0.4.3/grain-linux-x64" | ||
- uses: engineerd/[email protected] | ||
with: | ||
name: "wasmtime" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
### Env.**splitEnvVar** | ||
|
||
```grain | ||
splitEnvVar : String -> (String, String) | ||
``` | ||
|
||
Split an environment variable at the first equals sign. | ||
|
||
Parameters: | ||
|
||
|param|type|description| | ||
|-----|----|-----------| | ||
|`item`|`String`|An environment variable pair, separated by an equals sign (=).| | ||
|
||
Returns: | ||
|
||
|type|description| | ||
|----|-----------| | ||
|`(String, String)`|A tuple key/value pair.| | ||
|
||
### Env.**envMap** | ||
|
||
```grain | ||
envMap : () -> Map.Map<a, b> | ||
``` | ||
|
||
Get the environment variables as a Map<String, String> | ||
|
||
Returns: | ||
|
||
|type|description| | ||
|----|-----------| | ||
|`Map.Map<a, b>`|A map of all environment variables.| | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
### Mediatype.**default_mt** | ||
|
||
```grain | ||
default_mt : String | ||
``` | ||
|
||
### Mediatype.**guess** | ||
|
||
```grain | ||
guess : String -> String | ||
``` | ||
|
||
Guess the media type of this file | ||
|
||
Per recommendation, if no media type is found for an extension, | ||
this returns `application/octet-stream`. | ||
|
||
Parameters: | ||
|
||
|param|type|description| | ||
|-----|----|-----------| | ||
|`filename`|`String`|The name of the file| | ||
|
||
Returns: | ||
|
||
|type|description| | ||
|----|-----------| | ||
|`String`|A media type| | ||
|
Oops, something went wrong.