native

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2021 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

This package provides APIs for working with platform-specific code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Invoke

func Invoke(feature Feature)

Invoke invokes the specified feature's method for the current platform.

Types

type Feature

type Feature interface {
	// This method is called if the app is running in the browser.
	OnWeb()

	// This method is called if the app is running on either of the following platforms: Windows, Linux, Darwin(macOS).
	OnPc()
}

Feature is used to implement platform-specific logic. This interface provides methods to be called for each supported platform.

type FeatureImpl

type FeatureImpl struct {
}

func (*FeatureImpl) OnPc

func (f *FeatureImpl) OnPc()

func (*FeatureImpl) OnWeb

func (f *FeatureImpl) OnWeb()

Directories

Path Synopsis
This package is used for interacting with native web features.
This package is used for interacting with native web features.

Jump to

Keyboard shortcuts

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