You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: still_basic.go
    path of file: ./repos/learn-go-with-tests/q-and-a/http-handlers-revisited
    
    the code of the file until where you have to start completion: package main

import (
	"encoding/json"
	"fmt"
	"log"
	"net/http"
)

// User represents a person in our system.
type User struct {
	Name string
}

// UserService provides ways of working with users.
type UserService interface {
	Register(user User) (insertedID string, err error)
}

// UserServer provides an HTTP API for working with users.
type UserServer
    
func (u *UserServer) RegisterUser(w http.ResponseWriter, r *http.Request) {
	defer r.Body.Close()

	var newUser User
	err := json.NewDecoder(r.Body).Decode(&newUser)

	if err != nil {
		http.Error(w, fmt.Sprintf("could not decode user payload: %v", err), http.StatusBadRequest)
		return
	}

	insertedID, err := u.service.Register(newUser)

	if err != nil {
		//todo: handle different kinds of errors differently
		http.Error(w, fmt.Sprintf("problem registering new user: %v", err), http.StatusInternalServerError)
		return
	}

	w.WriteHeader(http.StatusCreated)
	fmt.Fprint(w, insertedID)
}