Update the `SNIPPET.txt` of the Ballerina track

I want to update the SNIPPET.txt file of the Ballerina track with the code below.

import ballerina/http;
import ballerina/io;

service hello on new http:Listener(9090) {
  resource function sayHello(http:Caller caller, http:Request request) {
        http:Response response = new;
        response.setTextPayload("Hello Ballerina!");
        var responseResult = caller->respond(response);
        if (responseResult is error) {
            io:println("error responding back to client.");

Can I get help on this as the PR I created for this got automatically closed?

@praneesha You’ve deleted your branch so I can’t reopen the PR. But if you make another one and link to it here and tag me in it, I’ll merge it :)

@iHiD heads-up: adding an introductory video seems to remove/hide the snippet.

  • The Go track contains a SNIPPET.txt but does not show it.
  • The Ballerina track used to show a snippet but now that the video was added does not anymore.

Sure you’re not looking at different pages? Screenshot pls :)

This is what I see at exercism.org/tracks/ballerina:

And this is what I see at exercism.org/tracks/bash:

Sorry, yes. This is expected. I thought you were saying it’s different from Go.

So this thread is moot?

I think I do see some value in having both a snippet and an introductory video.

Showing the video is expected and correct.

However, I want to apply the latest Ballerina syntax in the SNIPPET.txt file in case we can use it in the future (i.e., when we can show both the snippet and video on the About page as @MatthijsBlom mentioned in the reply above.).

@iHiD - Created a new PR and tagged you to update the code. Please merge.


No, because the video has now been added. But otherwise, yes :slight_smile:

1 Like

That’s the other thread :upside_down_face:

That sorts it too. Thank you so much for the support.

Highly appreciated.