Skip to content

Commit

Permalink
Remove isolated Keyword from starwars Example (#1766)
Browse files Browse the repository at this point in the history
  • Loading branch information
DimuthuMadushan authored Feb 26, 2024
1 parent e148252 commit 63450ac
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions examples/starwars/starship.bal
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,35 @@
import starwars.datasource as ds;

# A ship from the Star Wars universe
public distinct isolated service class Starship {
distinct service class Starship {

private final readonly & ds:StarshipRecord starship;

isolated function init(ds:StarshipRecord starship) {
function init(ds:StarshipRecord starship) {
self.starship = starship.cloneReadOnly();
}

# The unique identifier of the starship
# + return - The id
isolated resource function get id() returns string {
resource function get id() returns string {
return self.starship.id;
}

# The name of the starship
# + return - The name
isolated resource function get name() returns string {
resource function get name() returns string {
return self.starship.name;
}

# The length of the starship, or null if unknown
# + return - The length
isolated resource function get length() returns float? {
resource function get length() returns float? {
return self.starship?.length;
}

# Cordinates of the starship, or null if unknown
# + return - The cordinates
isolated resource function get cordinates() returns float[][]? {
resource function get cordinates() returns float[][]? {
return self.starship?.cordinates;
}
}

0 comments on commit 63450ac

Please sign in to comment.