Skip to content

Commit

Permalink
update uncomment usage
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitpaulk committed Aug 27, 2024
1 parent d538038 commit 22c9147
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 22 deletions.
6 changes: 4 additions & 2 deletions compiled_starters/go/app/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ package main

import (
"fmt"
// Uncomment this block to pass the first stage
// "net"
"net"
)

// Ensures gofmt doesn't remove the "net" import in stage 1 (feel free to remove this!)
var _ = net.ListenUDP

func main() {
// You can use print statements as follows for debugging, they'll be visible when running tests.
fmt.Println("Logs from your program will appear here!")
Expand Down
4 changes: 2 additions & 2 deletions compiled_starters/rust/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Uncomment this block to pass the first stage
// use std::net::UdpSocket;
#[allow(unused_imports)]
use std::net::UdpSocket;

fn main() {
// You can use print statements as follows for debugging, they'll be visible when running tests.
Expand Down
3 changes: 3 additions & 0 deletions solutions/go/01-ux2/code/app/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import (
"net"
)

// Ensures gofmt doesn't remove the "net" import in stage 1 (feel free to remove this!)
var _ = net.ListenUDP

func main() {
udpAddr, err := net.ResolveUDPAddr("udp", "127.0.0.1:2053")
if err != nil {
Expand Down
9 changes: 5 additions & 4 deletions solutions/go/01-ux2/diff/app/main.go.diff
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
@@ -1,48 +1,42 @@
@@ -1,50 +1,45 @@
package main

import (
"fmt"
- // Uncomment this block to pass the first stage
- // "net"
+ "net"
"net"
)

// Ensures gofmt doesn't remove the "net" import in stage 1 (feel free to remove this!)
var _ = net.ListenUDP

func main() {
- // You can use print statements as follows for debugging, they'll be visible when running tests.
- fmt.Println("Logs from your program will appear here!")
Expand Down
5 changes: 0 additions & 5 deletions solutions/go/01-ux2/explanation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ The entry point for your DNS Server implementation is in `app/main.go`.

Study and uncomment the relevant code:

```go
// Uncomment this block to pass the first stage
"net"
```

```go
// Uncomment this block to pass the first stage

Expand Down
1 change: 1 addition & 0 deletions solutions/rust/01-ux2/code/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#[allow(unused_imports)]
use std::net::UdpSocket;

fn main() {
Expand Down
7 changes: 3 additions & 4 deletions solutions/rust/01-ux2/diff/src/main.rs.diff
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
@@ -1,27 +1,22 @@
-// Uncomment this block to pass the first stage
-// use std::net::UdpSocket;
+use std::net::UdpSocket;
@@ -1,27 +1,23 @@
#[allow(unused_imports)]
use std::net::UdpSocket;

fn main() {
- // You can use print statements as follows for debugging, they'll be visible when running tests.
Expand Down
5 changes: 0 additions & 5 deletions solutions/rust/01-ux2/explanation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ The entry point for your DNS Server implementation is in `src/main.rs`.

Study and uncomment the relevant code:

```rust
// Uncomment this block to pass the first stage
use std::net::UdpSocket;
```

```rust
// Uncomment this block to pass the first stage
let udp_socket = UdpSocket::bind("127.0.0.1:2053").expect("Failed to bind to address");
Expand Down

0 comments on commit 22c9147

Please sign in to comment.