Skip to content

Instantly share code, notes, and snippets.

View euroelessar's full-sized avatar

Ruslan Nigmatullin euroelessar

  • OpenAI
  • Mountain View, California, USA
View GitHub Profile
package main
import (
"errors"
"flag"
"fmt"
"io"
"io/ioutil"
"log"
"net/http"
// Status without details results to non-utf-8 string followed by percent-encoding.
func (s *server) SayHello(ctx context.Context, in *pb.HelloRequest) (*pb.HelloReply, error) {
grpcStatus := status.New(codes.InvalidArgument, string([]byte{0xff, 0xfe, 0xfd}))
return nil, grpcStatus.Err()
}
// Adding detail to status results to panic.
func (s *server) SayHello(ctx context.Context, in *pb.HelloRequest) (*pb.HelloReply, error) {
{
"metadata": {
"name": "practice2"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
{
"metadata": {
"name": "practice3"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{