Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 1006 Bytes

STYLE_GUIDE.adoc

File metadata and controls

44 lines (30 loc) · 1006 Bytes

Code Style Guide

Backend - Go

The backend is written in Go. If you are not familiar with it, you can take a Tour of Go.

In Kiali we use gofmt as part of our build process to keep a consistent formatting.

While we haven’t automated static code analysers, it is still a good idea to check that new pieces of code are correct with tools such as golint or govet.

Imports

If you need any library you should import them in the following format

<standard imports>
LINE
<third party imports>
LINE
<kiali imports>

Example:

import (
	"errors"
	"fmt"
	"time"

	"github.com/dgrijalva/jwt-go"

	"github.com/kiali/kiali/log"
)

Frontend - TypeScript

Check the dedicated guide in kiali-ui.