minimumgo

package module
v0.0.0-...-9c3aafd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2018 License: BSD-2-Clause Imports: 11 Imported by: 0

README

README

minimumgo: Do minimum initialization to execute a single golang executable on linux kernal

STATUS: This is still alpha version

If you have a golang executalbe file and you don't need any other, import this package and execute your golang executalbe file as init.

Install

go get github.com/tetsu-koba/minimumgo

How to use

Blank import this package to your go source file which have main().

import _ "github.com/tetsu-koba/minimumgo"

You have to add this line before any other imports to initialize this package first.

See example/httpfileserver/httpfileserver.go

Build

Build your golang executable and put it as /sbin/init, or add kernel boot parameter init= to start your program as init.

If you have a raspberry pi, see example/initramfs/README.md to make initramfs image for raspberry pi.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exists

func Exists(filename string) bool

func Ntpdate

func Ntpdate(server string) (err error)

func Rdate

func Rdate(server string) (err error)

Types

This section is empty.

Directories

Path Synopsis
example

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL